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

A11y | <title> doesn't make an svg screen reader friendly #2903

Open
Arol15 opened this issue May 10, 2024 · 0 comments
Open

A11y | <title> doesn't make an svg screen reader friendly #2903

Arol15 opened this issue May 10, 2024 · 0 comments

Comments

@Arol15
Copy link

Arol15 commented May 10, 2024

Hi Tane,

I've noticed that the title prop isn't behaving as expected for SVG accessibility. According to the Accessibility API Mappings spec, the <title> element in SVG should be exposed to assistive technology through the accessibility tree. However, currently, on Mac VoiceOver, it's being read simply as image. Additionally, there's no tooltip displayed when I hover over an icon, which should show the text from the <title> element. I've tested this with other components that use svgs (not ReactSVG) and the title is being read by a screen reader and a tooltip is also being displayed.

In Chrome, the correct naming behavior occurs when a developer provides content in an aria-label, provided that aria-hidden is set to false. I'm using this approach for standalone icons with no text next to them.

Another potential solution could involve adding an id attribute to the <title> element so that it could be bound to the SVG. However, this feels like a more complex approach since we don't have direct access to modify the <title> element with props.

Is this behavior expected? Am I missing anything?

Thank you,
Lora.

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

No branches or pull requests

1 participant