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

bug(text, shape): measurement utils create svgs that screen readers can see #1544

Closed
thomashoggard opened this issue Jul 22, 2022 · 3 comments · Fixed by #1551
Closed

bug(text, shape): measurement utils create svgs that screen readers can see #1544

thomashoggard opened this issue Jul 22, 2022 · 3 comments · Fixed by #1551

Comments

@thomashoggard
Copy link
Contributor

thomashoggard commented Jul 22, 2022

Within the visx-text utility function getStringWidth, it creates an svg and appends it to the pages body. Using voiceover on Mac, you can navigate to the svg and it will read out the text element to the user. I think we should add aria-hidden to the svg element to prevent it from being picked up.

@williaster
Copy link
Collaborator

hey @thomashoggard 👋 thanks for highlighting this issue. I agree with your suggested solution, happy to review a PR if someone wants to take a shot at it! 👀

@williaster williaster changed the title visx-axis utility function getStringWidth generates a svg that screen readers can see bug(text, shape): measurement utils create svgs that screen readers can see Jul 23, 2022
@williaster
Copy link
Collaborator

noting this is a problem in @visx/text (linked above) and probably also in @visx/shape where we also have a measurement element https://github.com/airbnb/visx/blob/15e3f8cd33c4df1982a2f70487e367c6fac87d7c/packages/visx-shape/src/util/getOrCreateMeasurementElement.ts

@thomashoggard
Copy link
Contributor Author

I can take a stab at it on Monday if no one gets around to it by then!

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

Successfully merging a pull request may close this issue.

2 participants