Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

fix(icons): fixing a11y issues related to icons in core #5250

Merged
merged 1 commit into from Nov 3, 2020

Conversation

mathisscott
Copy link
Contributor

• removed legacy architecture tying the svg to the icon component via aria-labelledBy
• replaced legacy architecture with aria-labelling on the icon component
• set icon component role to image
• hid the underlying svg inside the icon with aria-hidden because screen readers were "double announcing" it
• fixed unit tests in icons and alerts that were broken by new architecture and still relevant
• updated icon stories to demonstrate accessible use of icons
• fixed 'dir' attr in icons api story to use 'direction'
• verified in voiceover

Signed-off-by: Scott Mathis smathis@vmware.com

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • If applicable, have a visual design approval

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • clarity.design website / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Icons in a screen reader are confusing.

Issue Number: N/A

What is the new behavior?

Icons in a screen reader make sense now.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

CC: @scroniser

• removed legacy architecture tying the svg to the icon component via aria-labelledBy
• replaced legacy architecture with aria-labelling on the icon component
• set icon component role to image
• hid the underlying svg inside the icon with aria-hidden because screen readers were "double announcing" it
• fixed unit tests in icons and alerts that were broken by new architecture and still relevant
• updated icon stories to demonstrate accessible use of icons
• fixed 'dir' attr in icons api story to use 'direction'
• verified in voiceover

Signed-off-by: Scott Mathis <smathis@vmware.com>
@mathisscott mathisscott merged commit ab773b9 into vmware-archive:next Nov 3, 2020
@mathisscott mathisscott deleted the fix/coreIconA11yFixes branch November 3, 2020 14:31
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants