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

Accessibility: Fixed reading order of keyboard shortcuts. #15631

Merged

Conversation

nicolad
Copy link
Member

@nicolad nicolad commented May 14, 2019

Description

Fixes: #15317

How has this been tested?

This was tested locally.

Types of changes

Replaced description list with unordered list.
Removed order prop and changed the order of elements.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@nicolad nicolad added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label May 14, 2019
@nicolad nicolad self-assigned this May 14, 2019
@swissspidy swissspidy requested a review from afercia May 14, 2019 16:59
Copy link
Contributor

@afercia afercia left a comment

Choose a reason for hiding this comment

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

Thanks a lot @nicolad for working on this. The native order improves things a lot.

Noticed a couple things that should be addressed:

1
Safari doesn't expose styled lists as lists to assistive technologies. This is a known Safari "feature", which requires to add a redundant role="list" to the <ul> element. As a consequence, the related ESLint rule needs to be disabled with an explanatory comment. See for example:

/*
* Disable reason: The `list` ARIA role is redundant but
* Safari+VoiceOver won't announce the list otherwise.
*/
/* eslint-disable jsx-a11y/no-redundant-roles */
<ul className="editor-block-navigation__list block-editor-block-navigation__list" role="list">

2
<li> elements inherit margin-bottom: 6px; from WordPress, this should be reset to not introduce visual changes

Lastly, I've noticed some shortcuts miss the aria-label, which is meant to make the various shortcuts be announced in a more "human friendly" way. This is a pre-existing problem though, will create a separate issue.

@nicolad
Copy link
Member Author

nicolad commented May 15, 2019

Thank you @afercia, you have 👀 of the 🐯

@afercia
Copy link
Contributor

afercia commented May 15, 2019

Looks good to me, thanks! 👍

@nicolad nicolad merged commit a61a3fb into master May 15, 2019
@youknowriad youknowriad deleted the accessibility/replace-dt-with-ul-in-keyboard-shortcuts branch May 15, 2019 14:26
@gziolo gziolo added this to the 5.8 (Gutenberg) milestone May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reading order does not match visual order
3 participants