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

[DSS-210] Bug: Icon role not present #1738

Merged
merged 2 commits into from
May 8, 2023

Conversation

teenwolfblitzer
Copy link
Member

@teenwolfblitzer teenwolfblitzer commented May 5, 2023

Description

Corrects an accessibility violation in the Icon component by adding role="img" when an aria-label is applied. This is only necessary because we're using an icon font, where the unicode character does not provide a useful label.

Note: see the potential drawbacks to this patch when loading is interrupted.

Screenshots

a11y-violation

Testing in sage-lib

  1. Navigate to the Icon component in Storybook
  2. Open the Addon panel, and view the "Accessibility" tab
  3. Verify there are no Violations listed
  4. Navigate to the Icon component in the Rails docs
  5. Inspect an icon with no visible label (aria-label only)
  6. Confirm that role="img" has been applied to the component

Testing in kajabi-products

  1. (HIGH) Adds role attribute on uses of icons with labels. Accessibility-only, no visual or functional impact in kajabi-products.

Related

@teenwolfblitzer teenwolfblitzer self-assigned this May 5, 2023
@teenwolfblitzer teenwolfblitzer marked this pull request as ready for review May 5, 2023 22:32
@teenwolfblitzer teenwolfblitzer requested a review from a team May 5, 2023 22:32
Copy link
Member

@pixelflips pixelflips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for updating! 👍🏼

@pixelflips pixelflips requested a review from a team May 5, 2023 22:33
@teenwolfblitzer teenwolfblitzer added the bug Something isn't working label May 5, 2023
Copy link
Contributor

@anechol anechol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@teenwolfblitzer teenwolfblitzer merged commit 175ba94 into develop May 8, 2023
@teenwolfblitzer teenwolfblitzer deleted the DSS-210_icon_role_not_present branch June 6, 2023 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants