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

Add shortcut aria label for unreadable shortcuts #9582

Merged
merged 9 commits into from Sep 13, 2018

Conversation

Projects
None yet
3 participants
@talldan
Contributor

talldan commented Sep 3, 2018

Description

Fixes #9362

Some keyboard shortcuts contain characters that screen readers don't typically read (e.g. the toggle sidebar shortcut Cmd+Shift+,). This PR adds an aria-label for those shortcuts. The changes:

  • Adds a new utility function in keycodes for building an aria-label string.
  • Adds a shortcut component that can receive the additional aria label prop.
  • Implements the shortcut component in MenuItem and Tooltip

How has this been tested?

  • Tested using voiceover

Screenshots

screen shot 2018-09-03 at 4 25 13 pm

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.

@talldan talldan added this to the 3.8 milestone Sep 3, 2018

@talldan talldan self-assigned this Sep 3, 2018

@talldan talldan requested review from iseulde and afercia Sep 3, 2018

@afercia

This comment has been minimized.

Show comment
Hide comment
@afercia

afercia Sep 3, 2018

Contributor

@talldan thanks so much for tackling this. Unrelated but since we're here: I'd suggest to take the opportunity to fix the string
Navigate to a the next part of the editor.

where the a seems a typo.

Contributor

afercia commented Sep 3, 2018

@talldan thanks so much for tackling this. Unrelated but since we're here: I'd suggest to take the opportunity to fix the string
Navigate to a the next part of the editor.

where the a seems a typo.

@talldan

This comment has been minimized.

Show comment
Hide comment
@talldan

talldan Sep 5, 2018

Contributor

Thanks for catching that @afercia - added a commit to fix it.

Contributor

talldan commented Sep 5, 2018

Thanks for catching that @afercia - added a commit to fix it.

@youknowriad youknowriad modified the milestones: 3.8, 3.9 Sep 5, 2018

@talldan talldan requested a review from WordPress/gutenberg-core Sep 11, 2018

@youknowriad

Nice 👍

@youknowriad youknowriad merged commit 6712e28 into master Sep 13, 2018

2 checks passed

codecov/project No report found to compare against
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@youknowriad youknowriad deleted the add/shortcut-aria-label branch Sep 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment