fix(tags): add screen reader improvements - #2045
Conversation
🦋 Changeset detectedLatest commit: 2525502 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for stacks ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for stacks-svelte ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
dancormier
left a comment
There was a problem hiding this comment.
Thanks for tackling these accessibility improvements @mukunku ❤️ I'm 100% on board for the watched/ignored/etc updates and the addition of descriptive text for the dismiss button.
The only real reservation I have is the addition of tabindex="0" to tags that aren't interactive. Screen readers should be able to generally assist with informing the user of static text and should prioritize tabbing for interactive elements. Generally, I reserve it for either elements that are scrollable (like the code examples in the docs) or elements that are not interactive by default but made interactive via JS (this should almost always be avoided but exceptions occasionally arise).
Let me know if this makes sense or not, or if I'm misinterpreting the purpose
Summary
This PR addresses some accessibility gaps with regards to our Tags component and screen readers: https://stackoverflow.atlassian.net/browse/A11Y-89
It does the following:
tabindexwhen using<span>s instead of<a>sHow to Test
Confirm screen reader improvements in: