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

feat(icons): add ariaLabel props to icons #463

Merged
merged 4 commits into from
May 21, 2024

Conversation

nataliadelmar
Copy link
Collaborator

@nataliadelmar nataliadelmar commented May 17, 2024

Description

Adding ariaLabel props to Icons to be able to add a text that explains the meaning of the icon in case it is informative and not decorative.

Accessibility references recommend adding a <title> as a child of the tag. However, we receive the svg directly from momentum-design/icons, and it would be an over-do if we transform the element we get to add the title.

Screen readers only need to:

  1. In case the icon has decorative meaning, they they should not access it (aria-hidden)
  2. In case the icon has informative meaning, they should be able to access it and read the aria-label provided to it.

Links

Links to relevent resources.

@nataliadelmar nataliadelmar added the validated If the pull request is validated automation. label May 17, 2024
Copy link
Collaborator

@maxinteger maxinteger left a comment

Choose a reason for hiding this comment

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

Nice one

@nataliadelmar nataliadelmar merged commit f5018d5 into momentum-design:master May 21, 2024
5 checks passed
Copy link

🎉 This PR is included in version 26.103.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released validated If the pull request is validated automation.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants