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

Using the up arrow key to navigate to parent blocks no longer works properly #18928

Closed
ZebulanStanphill opened this issue Dec 5, 2019 · 3 comments · Fixed by #19135
Closed
Assignees
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release

Comments

@ZebulanStanphill
Copy link
Member

ZebulanStanphill commented Dec 5, 2019

The issue

Pressing the up arrow key while your selection is on the first child block of another block should navigate to the parent block. At some point this behavior seems to have been broken and no longer works properly in master. This was working properly in Gutenberg 7.0.0.

I suspect this issue may be related to #18780 and #18881.

How to reproduce

  1. Create a new post.
  2. Insert a Group block.
  3. Insert any block inside the Group block.
  4. Press the up arrow key. Notice that you don't navigate to the Group block.
  5. Press the up arrow key again. Notice that you navigate to the post title, skipping the Group block entirely.

Environment

  • WordPress 5.4-alpha-46814
  • Gutenberg master as of 49dac29
  • Using Dissenter browser 0.70 (based on Chromium 78)
@ZebulanStanphill ZebulanStanphill added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Type] Regression Related to a regression in the latest release [a11y] Keyboard & Focus labels Dec 5, 2019
@ellatrix
Copy link
Member

ellatrix commented Dec 6, 2019

Whatever fixes it should add an e2e test.

@aduth
Copy link
Member

aduth commented Dec 13, 2019

Appears to have been introduced by #18379

@aduth
Copy link
Member

aduth commented Dec 13, 2019

Fix proposed at #19135.

Whatever fixes it should add an e2e test.

As noted in the description of #19135, we do have an end-to-end test which attempts to verify this behavior (source). However, because it relied on the DOM as the source of truth, and because the active element in the DOM was correct (despite it showing the wrong block's toolbar), the tests would pass. In #19135, I've updated the test to assert against both the DOM and the block editor state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Regression Related to a regression in the latest release
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants