Skip to content

Commit

Permalink
fix(a11y): add role to make lock icon readable
Browse files Browse the repository at this point in the history
refactor(tests): update snapshots
  • Loading branch information
royschut committed Feb 28, 2024
1 parent 954d40f commit b08159a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ui-react/src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function Card({
{featured && !disabled && heading}
<div className={styles.tags}>
{isLocked && (
<div className={classNames(styles.tag, styles.lock)} aria-label={t('card_lock')}>
<div className={classNames(styles.tag, styles.lock)} aria-label={t('card_lock')} role="img">
<Icon icon={Lock} />
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ exports[`<Card> > should render anchor tag 1`] = `
<div
aria-label="card_lock"
class="_tag_d75732 _lock_d75732"
role="img"
>
<svg
aria-hidden="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ exports[`<Filter> > renders Filter 1`] = `
role="listbox"
>
<button
aria-selected="false"
class="_button_f8f296 _default_f8f296 _outlined_f8f296"
role="option"
type="button"
Expand All @@ -17,6 +18,7 @@ exports[`<Filter> > renders Filter 1`] = `
</span>
</button>
<button
aria-selected="false"
class="_button_f8f296 _default_f8f296 _outlined_f8f296"
role="option"
type="button"
Expand All @@ -26,6 +28,7 @@ exports[`<Filter> > renders Filter 1`] = `
</span>
</button>
<button
aria-selected="false"
class="_button_f8f296 _default_f8f296 _outlined_f8f296"
role="option"
type="button"
Expand All @@ -35,6 +38,7 @@ exports[`<Filter> > renders Filter 1`] = `
</span>
</button>
<button
aria-selected="false"
class="_button_f8f296 _default_f8f296 _outlined_f8f296"
role="option"
type="button"
Expand Down

0 comments on commit b08159a

Please sign in to comment.