Skip to content

Website: redundant alternative text for SVGs, account dropdown incorrect ARIA, unnecessary role="button" on buttons #2483

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

Closed
patrickhlauke opened this issue Jun 6, 2018 · 1 comment

Comments

@patrickhlauke
Copy link
Contributor

(as discussed in person with @miketaylr the other week) the various SVGs used on the site have duplicate/triplicate alternative text. in general:

  • if they're purely decorative, don't include any extra <title> or any text in the <use></use> elements, set aria-hidden="true" to be safe
  • if they're part of a control (like a button) that already has a name/label (e.g. text content, an existing aria-label, or similar) they're decorative, so see above

while looking over this issue, I also stumbled across a few other things:

  • a few invalid aria-role="hide" attributes?
  • redundant role="button" on <button> elements
  • aria-pressed is used for the account dropdown in the header. but it's then updated (true/false) not on the button itself, but its parent <li> element by the script. also, aria-expanded is probably more appropriate.
@miketaylr
Copy link
Member

Fixed by 958bac4.

❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants