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

Docs: Navbar logo has extra decorative "TypeScript ESLint logo" narration #5213

Closed
2 tasks done
JoshuaKGoldberg opened this issue Jun 20, 2022 · 13 comments · Fixed by #5568
Closed
2 tasks done

Docs: Navbar logo has extra decorative "TypeScript ESLint logo" narration #5213

JoshuaKGoldberg opened this issue Jun 20, 2022 · 13 comments · Fixed by #5568
Labels
accepting prs Go ahead, send a pull request that resolves this issue accessibility ("a11y"): making the site more accessible to all users bug Something isn't working good first issue Good for newcomers package: website Issues related to the @typescript-eslint website

Comments

@JoshuaKGoldberg
Copy link
Member

Before You File a Documentation Request Please Confirm You Have Done The Following...

Suggested Changes

The structure of the TypeScript ESLint logo & title in the navbar is roughly:

<a href="...">
  <img alt="TypeScript ESLint logo" src="..." />
  TypeScript ESLint
</a>

As a result, screenreaders narrate it as roughly like:

TypeScript ESLint logo TypeScript ESLint

Discussed on stream with @BenDMyers on Twitch: https://www.twitch.tv/videos/1498962341. The logo doesn't add any semantic meaning to the page. We should consider it decorative. See https://www.w3.org/WAI/tutorials/images/decorative for more details.

Affected URL(s)

@JoshuaKGoldberg JoshuaKGoldberg added bug Something isn't working good first issue Good for newcomers accepting prs Go ahead, send a pull request that resolves this issue package: website Issues related to the @typescript-eslint website accessibility ("a11y"): making the site more accessible to all users labels Jun 20, 2022
@Josh-Cena
Copy link
Member

logo.alt is included in the default template. In hindsight, I don't even know if it makes sense to provide an alt for any logo that has an accompanying text title (or even those without, considering logos are decorative)...

@armano2
Copy link
Member

armano2 commented Jun 20, 2022

alt should be present on logo and we should include aria-hidden to

@Josh-Cena
Copy link
Member

For example, if the logo image is broken, I don't think we should show an alt text—should we? An empty alt seems good enough.

@JoshuaKGoldberg
Copy link
Member Author

Yeah if the image is decorative there's no need to include an alt.

@BenDMyers
Copy link
Contributor

W3C's Web Accessibility Initiative has guidance on alt text for functional images, which specifically calls out logos used within links.

Their first example is an image used alone as a linked logo. Here, they recommend supplying alt text, since the image's alt text will be used to populate the link's accessible name for assistive tech.

Their second example is what we have on the TypeScript ESLint site: a logo image within the link text.

The image does not represent different functionality or convey other information than that already provided in the link text, so a null (empty) value is applied, (alt=""), to avoid redundancy and repetition. In effect the image is a decorative adjunct or visual cue to the link text…

@BenDMyers
Copy link
Contributor

Tried to fix this, but found that even if we supply an empty alt config on our end, Docusaurus populates it with the site title anyway. Filed a bug on Docusaurus at facebook/docusaurus#7658, and I'll spin up a PR to address it on their end as well.

@BenDMyers
Copy link
Contributor

The PR to address this in Docusaurus (facebook/docusaurus#7659) has been merged in. We just need to wait for the team to cut a new beta release before we can fix this here.

@Josh-Cena
Copy link
Member

Spoiler: next release will not be beta 😄

@JoshuaKGoldberg
Copy link
Member Author

Chris Pratt in Parks and Rec reacting with joy and shock

@BenDMyers
Copy link
Contributor

BenDMyers commented Jul 30, 2022

Following up on this — the Docusaurus team has cut a v2.0.0-rc.1 release candidate that includes facebook/docusaurus#7659, which is the upstream fix for this issue. If we upgraded to that release candidate, we'd get the fix. However, since it is a release candidate, Docusaurus v2.0 seems imminent, and so it could probably just be simpler to wait for 2.0 proper.

@JoshuaKGoldberg Thoughts?

@JoshuaKGoldberg
Copy link
Member Author

Yeah this bug isn't hard blocking anybody and there's a separate PR already for 2.0. Thanks for the update!

@BenDMyers
Copy link
Contributor

BenDMyers commented Jul 30, 2022

Cool - since there's a PR up for it anyways, would you be willing to mark this as to be resolved by #5377?

Wait, never mind. We'll still need to actually update the alt's config after rc.1 is in.

@Josh-Cena
Copy link
Member

Hey FYI 2.0 is hopefully scheduled tomorrow, after which I'll update that PR accordingly

@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
accepting prs Go ahead, send a pull request that resolves this issue accessibility ("a11y"): making the site more accessible to all users bug Something isn't working good first issue Good for newcomers package: website Issues related to the @typescript-eslint website
Projects
None yet
4 participants