Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(interactivetag): added aria label for screen reader users #17282

Merged
merged 13 commits into from
Sep 11, 2024
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
Loading