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

a11y: duplicate link text in user home page account links #6641

Open
eatyourgreens opened this issue Jan 22, 2025 · 1 comment
Open

a11y: duplicate link text in user home page account links #6641

eatyourgreens opened this issue Jan 22, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@eatyourgreens
Copy link
Contributor

eatyourgreens commented Jan 22, 2025

Package

  • lib-user

Describe the bug

The home page links for a user account duplicate the link text for each link:

  • Favorites FAVORITES.
  • Collections COLLECTIONS.
  • Comments COMMENTS.
  • Messages MESSAGES.

To Reproduce

On the homepage, or in the storybook, right-click on each link and inspect its accessible name in browser dev tools. This is the link text that will be heard in NVDA or JAWS.

Alternatively, use the Navigate like a screen reader user bookmarklet to list and inspect links (and form controls) on the page.

Screenshots

Chrome:

Screenshot of the user home page in Chrome, with browser dev tools open to show a list of links in the accessibility tree.

Firefox:

Screenshot of the user dashboard in the storybook, with browser dev tools open to show a list of links in the accessibility tree.

Expected behavior

Link text in a screen reader should match the text shown to sighted users. You don't need to duplicate a visible label as alt text.

Additional context

WCAG 2.2: SC 2.4.4: Link purpose (in context) is a level A requirement.

Alternative text of images should not be repeated as text (from the axe linter rules.)

@eatyourgreens eatyourgreens added the bug Something isn't working label Jan 22, 2025
@eatyourgreens
Copy link
Contributor Author

eatyourgreens commented Jan 22, 2025

Bonus accessibility tip: if you write a word as ALL CAPS, rather than styling it with text-transform: uppercase, then both JAWS and NVDA may read it out as an abbreviation, letter-by-letter.

EDIT: VoiceOver may also read upper case styled text letter-by-letter. 🤦🏼‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant