-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore(website): [a11y] Mark logo as decorative for assistive technologies #5568
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
Conversation
Thanks for the PR, @BenDMyers! typescript-eslint is a 100% community driven project, and we are incredibly grateful that you are contributing to that community. The core maintainers work on this in their personal time, so please understand that it may not be possible for them to review your work immediately. Thanks again! 🙏 Please, if you or your company is finding typescript-eslint valuable, help us sustain the project by sponsoring it transparently on https://opencollective.com/typescript-eslint. As a thank you, your profile/company logo will be added to our main README which receives thousands of unique visitors per day. |
✅ Deploy Preview for typescript-eslint ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5568 +/- ##
==========================================
+ Coverage 91.51% 91.63% +0.12%
==========================================
Files 349 134 -215
Lines 10945 1506 -9439
Branches 3222 226 -2996
==========================================
- Hits 10016 1380 -8636
+ Misses 602 62 -540
+ Partials 327 64 -263
Flags with carried forward coverage won't be shown. Click here to find out more. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Checklist
Fixes Docs: Navbar logo has extra decorative "TypeScript ESLint logo" narration #5213
Overview
On the TypeScript ESLint Docusaurus site, the logo's alt text ("TypeScript ESLint logo") is cluttering the logo link's accessible name for assistive technologies. When screenreader users navigate to the logo link, they're told "link, TypeScript ESLint logo TypeScript ESLint," which is too cumbersome. Additionally, voice control users would need to recite that name to trigger the link.
This pull request uses a change to Docusaurus that arrived in v2 (facebook/docusaurus#7658) to supply an empty alt text for the logo image, marking it as decorative for assistive technologies. As a result, the link's accessible name is simply "link, TypeScript ESLint."
DevTools showing empty alt for the image, and that the image is ignored in the accessibility tree:

(Note that Chrome DevTools shows
alt
when providedalt=""
. This is expected)DevTools showing the logo link in the Accessibility tree, with the newly shortened name:
This can be verified with a screenreader — I'm happy to demonstrate if needed.