Skip to content

Conversation

@ellatrix
Copy link
Member

Start for #552. Ideally the focus would also move to the first button of the toolbar.

@ellatrix ellatrix added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label May 23, 2017
@ellatrix
Copy link
Member Author

@youknowriad How do we best move focus to the toolbar in React?

@youknowriad
Copy link
Contributor

@iseulde There's no special React feature for this, you'll have to store the ref and call .focus.

@ellatrix
Copy link
Member Author

So, to clarify, the goal of this PR is to ignore the toolbars entirely in the focus order (atm this is inconsistent in master), so the focus goes straight from block content to content. The meta shortcut (and probably the current editor shortcut in wp-admin) should show the toolbar and move the focus to the first item, and then you can use tabbing as usual to go over the buttons. Esc to move focus back.

@jasmussen
Copy link
Contributor

So, to clarify, the goal of this PR is to ignore the toolbars entirely in the focus order (atm this is inconsistent in master), so the focus goes straight from block content to content. The meta shortcut (and probably the current editor shortcut in wp-admin) should show the toolbar and move the focus to the first item, and then you can use tabbing as usual to go over the buttons. Esc to move focus back.

This sounds right according to my reading of #297.

}

handleKeyUp() {
if ( this.metaCount === 1 ) {
Copy link
Member

Choose a reason for hiding this comment

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

Maybe a bit odd to expect, but if I hold down a non-meta character (say, c), then press a meta character, when releasing, metaCount is === 1.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for testing! 👍

@ellatrix ellatrix added the [Status] In Progress Tracking issues with work in progress label Jun 7, 2017
@ellatrix
Copy link
Member Author

#2960 took this over.

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). [Status] In Progress Tracking issues with work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants