Skip to content

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

Merged
merged 2 commits into from
Sep 2, 2022

Conversation

BenDMyers
Copy link
Contributor

PR Checklist

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 provided alt="". This is expected)
DevTools, showing empty alt for the image, and that the image is ignored in the accessibility tree

DevTools showing the logo link in the Accessibility tree, with the newly shortened name:

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.

@typescript-eslint
Copy link
Contributor

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.

@nx-cloud
Copy link

nx-cloud bot commented Aug 29, 2022

☁️ Nx Cloud Report

CI is running/has finished running commands for commit b400bd3. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this branch


✅ Successfully ran 47 targets

Sent with 💌 from NxCloud.

@netlify
Copy link

netlify bot commented Aug 29, 2022

Deploy Preview for typescript-eslint ready!

Name Link
🔨 Latest commit b400bd3
🔍 Latest deploy log https://app.netlify.com/sites/typescript-eslint/deploys/6310ea65b6bf75000879a7c1
😎 Deploy Preview https://deploy-preview-5568--typescript-eslint.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #5568 (b400bd3) into main (35bb8dd) will increase coverage by 0.12%.
The diff coverage is n/a.

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     
Flag Coverage Δ
unittest 91.63% <ø> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
packages/utils/src/ts-eslint/ESLint.ts
packages/utils/src/eslint-utils/RuleTester.ts
...plugin/src/rules/no-redundant-type-constituents.ts
...ages/eslint-plugin/src/rules/no-unsafe-argument.ts
packages/eslint-plugin/src/rules/typedef.ts
...utils/src/ast-utils/eslint-utils/PatternMatcher.ts
...kages/eslint-plugin/src/rules/no-dynamic-delete.ts
...ackages/eslint-plugin/src/rules/prefer-readonly.ts
packages/eslint-plugin/src/rules/no-shadow.ts
...es/eslint-plugin/src/rules/prefer-function-type.ts
... and 205 more

@bradzacher bradzacher changed the title fix(website): [a11y] Mark logo as decorative for assistive technologies chore(website): [a11y] Mark logo as decorative for assistive technologies Sep 2, 2022
Copy link
Member

@bradzacher bradzacher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for doing this!

image

@bradzacher bradzacher merged commit 4cbdc30 into typescript-eslint:main Sep 2, 2022
@BenDMyers BenDMyers deleted the nav-alt branch September 2, 2022 03:23
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Navbar logo has extra decorative "TypeScript ESLint logo" narration
2 participants