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

Details block: Try double enter to escape inner blocks #58903

Merged
merged 1 commit into from
Feb 12, 2024

Conversation

alexstine
Copy link
Contributor

What?

Adds the double enter functionality to exit inner blocks of the details block.

Why?

Improves accessibility for keyboard users.

Fixes: #56263

How?

Adds an __experimentalOnEnter support.

Testing Instructions

  1. Open a post or page.
  2. Insert a details block.
  3. Type a summary.
  4. Insert a paragraph block and enter some content.
  5. Press enter twice quickly to insert another block (outside of details block) as you can also do with list and quote.

Testing Instructions for Keyboard

Screenshots or screencast

@alexstine alexstine added [Type] Enhancement A suggestion for improvement. [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility [Block] Details Affects the Details Block - used to display content which can be shown/hidden labels Feb 9, 2024
@alexstine alexstine self-assigned this Feb 9, 2024
@alexstine alexstine requested a review from ajitbohra as a code owner February 9, 2024 21:42
Copy link
Contributor

@andrewhayward andrewhayward left a comment

Choose a reason for hiding this comment

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

Works as described for me.

Related – and this isn't a new issue, so feel free to ignore – it seems weird to me that you can't ArrowUp into a <details> block. You can ArrowDown through the block, but not back up again; once you get to the block after it, ArrowUp is ignored and movement just stops.

Instead you have to Escape into navigation/selection mode, then move around.

Copy link

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: alexstine <[email protected]>
Co-authored-by: andrewhayward <[email protected]>
Co-authored-by: carolinan <[email protected]>
Co-authored-by: talksina <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@alexstine alexstine merged commit c4ba5cf into trunk Feb 12, 2024
66 checks passed
@alexstine alexstine deleted the add/double-enter-details branch February 12, 2024 19:17
@github-actions github-actions bot added this to the Gutenberg 17.8 milestone Feb 12, 2024
aristath added a commit that referenced this pull request Feb 13, 2024
* trunk: (273 commits)
  Remove preffered style variations legacy support (#58930)
  Style theme variations: add property extraction and merge utils (#58803)
  Migrate `change-detection` to Playwright (#58767)
  Update Changelog for 17.6.6
  Docs: Clarify the status of the wp-block-styles theme support, and its intent (#58915)
  Use `data_wp_context` helper in core blocks and remove `data-wp-interactive` object (#58943)
  Try double enter for details block. (#58903)
  Template revisions API: move from experimental to compat/6.4 (#58920)
  Editor: Remove inline toolbar preference (#58945)
  Clean up link control CSS. (#58934)
  Font Library: Show error message when no fonts found to install (#58914)
  Block Bindings: lock editing of blocks by default (#58787)
  Editor: Remove the 'all' rendering mode (#58935)
  Pagination Numbers: Add `data-wp-key` to pagination numbers if enhanced pagination is enabled (#58189)
  Close link preview if collapsed selection when creating link (#58896)
  Fix incorrect useAnchor positioning when switching from virtual to rich text elements (#58900)
  Upgrade Floating UI packages, fix nested iframe positioning bug (#58932)
  Site editor: fix start patterns store selector (#58813)
  Revert "Rich text: pad multiple spaces through en/em replacement (#56341)" (#58792)
  Documentation: Clarify the performance reference commit and how to pick it (#58927)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Details Affects the Details Block - used to display content which can be shown/hidden [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Accessibility Feedback Need input from accessibility [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Details block: impossible to get out from block, using a keyboard
2 participants