Skip to content

Commit

Permalink
docs(icon-button): fixed aria-label support (#2213)
Browse files Browse the repository at this point in the history
  • Loading branch information
agliga authored Jul 15, 2024
1 parent 79a1abc commit 9bdbe20
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/lazy-oranges-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ebay/ebayui-core": minor
---

icon-button: added aria-label support in storybook
11 changes: 10 additions & 1 deletion src/components/ebay-icon-button/icon-button.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,14 @@ export default {
},
type: { category: "Options" },
},
ariaLabel: {
control: { type: "text" },
name: 'aria-label',
description:
'A descriptive label of what the icon button represents',
},
partiallyDisabled: {
name: 'partially-disabled',
description:
"programmatically disabled, but remains keyboard focusable",
table: {
Expand All @@ -65,13 +72,15 @@ export default {
control: { type: "boolean" },
},
badgeNumber: {
name: 'badge-number',
description: "number to show in badge",
table: {
category: "Badge (only with variant=icon)",
},
type: "number",
},
badgeAriaLabel: {
name: 'badge-aria-label',
description: "`aria-label` for badge",
table: {
category: "Badge",
Expand Down Expand Up @@ -145,7 +154,7 @@ Default.args = {
disabled: false,
partiallyDisabled: false,
badgeNumber: 0,
"aria-label": "menu",
ariaLabel: "menu",
};
Default.parameters = {
docs: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<DocumentFragment>
<button
aria-label="menu"
class="icon-btn"
data-ebayui=""
href=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<DocumentFragment>
<button
aria-label="menu"
class="icon-btn"
data-ebayui=""
href=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<DocumentFragment>
<button
aria-label="menu"
class="icon-btn icon-btn--primary"
data-ebayui=""
href=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<DocumentFragment>
<button
aria-label="menu"
class="icon-btn icon-btn--secondary"
data-ebayui=""
href=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<DocumentFragment>
<button
aria-label="menu"
class="icon-btn icon-btn--large"
data-ebayui=""
href=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<DocumentFragment>
<button
aria-label="menu"
class="icon-btn icon-btn--small"
data-ebayui=""
href=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<DocumentFragment>
<button
aria-label="menu"
class="icon-btn"
data-ebayui=""
disabled=""
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<DocumentFragment>
<button
aria-disabled="true"
aria-label="menu"
class="icon-btn"
data-ebayui=""
href=""
Expand Down

0 comments on commit 9bdbe20

Please sign in to comment.