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

Remove Invalid Aria-Label From SVG Text Elements #3000

Closed
wants to merge 1 commit into from
Closed

Remove Invalid Aria-Label From SVG Text Elements #3000

wants to merge 1 commit into from

Conversation

itsmattsoria
Copy link
Contributor

As @woutthielemans mentioned in #2944, the group element doesn't have a valid role compatible with aria-label, which actually potentially adds more confusion, and as was in their case, most cases I've run into where there are text elements in the SVG, they only add confusion, not clarity, when read without a description, and in at least VoiceOver, the title and desc are ignored if elements in the SVG contain aria-label. So instead of a screen reader reading a helpful title and description, it'll read random words without context. As was mentioned, you could make this label optional, but given that its presence isn't valid in the first place, the best and simplest solution is to remove it altogether. This commit removes the line that adds that attribute.

(edit: rename branch)

As @woutthielemans mentioned in #2944, the group element doesn't have a valid role compatible with `aria-label`, which actually potentially adds more confusion, and as was in their case, most cases I've run into where there are text elements in the SVG, they only add confusion, not clarity, when read without a description, and in at least VoiceOver, the `title` and `desc` are ignored if elements in the SVG contain `aria-label`. So instead of a screen reader reading a helpful title and description, it'll read random words without context. As was mentioned, you could make this label optional, but given that its presence isn't valid in the first place, the best and simplest solution is to remove it altogether. This commit removes the line that adds that attribute.
@itsmattsoria itsmattsoria closed this by deleting the head repository Jan 12, 2024
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

1 participant