Skip to content

Commit

Permalink
fix(interactivetag): added aria label for screen reader users (#17282)
Browse files Browse the repository at this point in the history
* fix: added aria label for screen reader users

* fix: added group to div

* fix: added to group

---------

Co-authored-by: kennylam <[email protected]>
  • Loading branch information
guidari and kennylam committed Sep 11, 2024
1 parent 9070215 commit 11a501d
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions packages/react/src/components/Tag/InteractiveTag.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default {

export const Selectable = (args) => {
return (
<>
<div aria-label="Selectable tags" role="group">
<SelectableTag
renderIcon={Asleep}
text="Tag content with a long text description"
Expand All @@ -41,7 +41,7 @@ export const Selectable = (args) => {
className="some-class"
{...args}
/>
</>
</div>
);
};

Expand Down Expand Up @@ -93,7 +93,10 @@ export const Operational = (args) => {

return (
<>
<div style={{ marginBottom: '1rem' }}>
<div
aria-label="Operational tags"
role="group"
style={{ marginBottom: '1rem' }}>
<OperationalTag
type="red"
className="some-class"
Expand Down Expand Up @@ -173,7 +176,9 @@ export const Operational = (args) => {
display: 'flex',
justifyContent: 'flex-start',
marginTop: '1rem',
}}>
}}
aria-label="Operational tags with Popover"
role="group">
{/* High contrast example */}
<Popover open={openHighContrast} highContrast>
<OperationalTag
Expand Down Expand Up @@ -295,7 +300,7 @@ Operational.argTypes = {

export const Dismissible = (args) => {
return (
<>
<div aria-label="Dismissible tags" role="group">
<DismissibleTag
type="red"
className="some-class"
Expand Down Expand Up @@ -380,7 +385,7 @@ export const Dismissible = (args) => {
text="Tag content"
{...args}
/>
</>
</div>
);
};

Expand Down

0 comments on commit 11a501d

Please sign in to comment.