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

Writing flow: simplify & fix tabbing out of block #19312

Merged
merged 2 commits into from
Dec 23, 2019

Conversation

ellatrix
Copy link
Member

@ellatrix ellatrix commented Dec 23, 2019

Description

In #19235, I added logic for tabbing to move focus before or after the block list if focus leaves the block. This adjusts part of it to avoid searching tabbables and based on elements outside WritingFlow.

It also fixes Storybook. The block editor currently errors if you tab out of it.

How has this been tested?

Screenshots

Types of changes

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.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .

@ellatrix ellatrix merged commit 32056df into master Dec 23, 2019
@ellatrix ellatrix deleted the fix/contain-writing-flow branch December 23, 2019 20:47
@@ -77,13 +77,23 @@ export function isNavigationCandidate( element, keyCode, hasModifier ) {
* Renders focus capturing areas to redirect focus to the selected block if not
* in Navigation mode.
*/
function FocusCapture( { selectedClientId, isReverse, containerRef } ) {
const FocusCapture = forwardRef( ( {
Copy link
Contributor

Choose a reason for hiding this comment

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

Things are becoming a little bit hard to follow for me. it would be good to clarify exactly what this component is for, its props...

Copy link
Member Author

Choose a reason for hiding this comment

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

Sorry, I should be documenting better! I'll write something for it.

Copy link
Member Author

Choose a reason for hiding this comment

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

Added some in #19314.

@ellatrix ellatrix mentioned this pull request Dec 23, 2019
6 tasks
@youknowriad youknowriad added this to the Gutenberg 7.2 milestone Jan 6, 2020
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.

2 participants