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

Improve the block switcher a11y #697

Merged
merged 1 commit into from
May 10, 2017
Merged

Conversation

afercia
Copy link
Contributor

@afercia afercia commented May 6, 2017

As done for the Inserter (see #527 ) this PR adds ARIA roles, states, and properties to the Block switcher.
Adds focus style to the menu items, same as hover.
Also, adds an aria-label to the block switcher toggle button and to the menu. Any suggestions for a better wording very welcome, for now the labels are:

  • Change block content type on the toggle
  • Content types on the menu

The block switcher menu will need also arrow keys navigation, see #696

Collapsed:

screen shot 2017-05-06 at 16 54 05

Expanded:

expanded

Menu label:

screen shot 2017-05-06 at 16 55 57

Fixes #695

Copy link
Member

@aduth aduth left a comment

Choose a reason for hiding this comment

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

Code looks good 👍 I'll defer to @jasmussen for feedback on wording; might depend on how much we want to commit to block terminology in these labels, i.e. "Block types" instead of "Content types".

@jasmussen
Copy link
Contributor

Is the word "content" necessary? I'd prefer simply "Change block type" and "Types", but that's not a strong opinion.

@jasmussen
Copy link
Contributor

@afercia you have a thumbs up on this one. Would you like me to rebase this and merge it in?

@afercia
Copy link
Contributor Author

afercia commented May 10, 2017

@jasmussen sure, I think the focus management issue is broader than this PR and will probably need a broader approach so 👍 for this PR.

@jasmussen
Copy link
Contributor

👍 👍 rebasing and merging.

@jasmussen jasmussen force-pushed the update/better-block-switcher-a11y branch from 55dc25c to 176e195 Compare May 10, 2017 12:08
@jasmussen jasmussen merged commit 052a5d6 into master May 10, 2017
@jasmussen jasmussen deleted the update/better-block-switcher-a11y branch May 10, 2017 12:09
@jasmussen
Copy link
Contributor

Thank you for this!

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

Successfully merging this pull request may close these issues.

3 participants