Skip to content

Commit

Permalink
feat(cc-button)!: remove the accessibleName prop & associated attri…
Browse files Browse the repository at this point in the history
…bute

Use the `a11y-name` attribute or the `a11yName` property instead.
  • Loading branch information
florian-sanders-cc committed Mar 7, 2024
1 parent 6c322c3 commit 8a7a0f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
13 changes: 0 additions & 13 deletions src/components/cc-button/cc-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ export class CcButton extends LitElement {

static get properties () {
return {
accessibleName: { type: String, attribute: 'accessible-name' },
a11yExpanded: { type: Boolean, attribute: 'a11y-expanded', reflect: true },
a11yName: { type: String, attribute: 'a11y-name' },
a11yPressed: { type: Boolean, attribute: 'a11y-pressed', reflect: true },
Expand Down Expand Up @@ -128,18 +127,6 @@ export class CcButton extends LitElement {
this._cancelMode = false;
}

get accessibleName () {
return this.a11yName;
}

/**
* Deprecated property. Use `a11yName` property or `a11y-name` attribute instead.
* @deprecated
*/
set accessibleName (value) {
this.a11yName = value;
}

focus () {
this.shadowRoot.querySelector('button').focus();
}
Expand Down
1 change: 0 additions & 1 deletion src/components/cc-button/cc-button.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ export const accessibleName = makeStory(conf, {
`,
dom: (container) => {
container.innerHTML = `
<cc-notice intent="warning"><span slot="message">The <code>accessible-name</code> attribute is deprecated in favor of <code>a11y-name</code></span></cc-notice>
<p>The accessible name can be checked by using the accessibility inspector of your browser.</p>
<p>You may also hover the buttons because we populate the <code>title</code> attribute with the same value.</p>
Expand Down

0 comments on commit 8a7a0f0

Please sign in to comment.