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(react): added aria-hidden fallback for decorative icons #2158

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jguddas
Copy link
Member

@jguddas jguddas commented May 18, 2024

What is the purpose of this pull request?

  • New Icon
  • Bug fix
  • New Feature
  • Documentation update
  • Other: Fixing an accessibility nuisance

Description

When you use an icon without a label <Square/> it will be read out by a lot of screen readers as Image.
After asking some people including screen reader users it looks like this is just a nuisance and having icons that don't have a label be hidden by default is the way to go.

Related to #2121.

Before Submitting

Copy link
Member

@karsa-mistmere karsa-mistmere left a comment

Choose a reason for hiding this comment

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

Nice job on the implementation, however, I do have three concerns to raise:

  1. There are some linting issues that need to be fixed.

  2. While, as we've privately discussed, I'm in support of adding this functionality exactly as implemented, I think we should add it to every package where possible, not just lucide-react (most of them should be pretty straightforward with how you've implemented this).

  3. This is definitely something that we should explicitly document in our guide. Possibly the Accessibility guide in feat(docs): added accessibility guide #2122, but probably also relevant package documentations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants