Skip to content

[6.x] Forms 2: Make the logic tree usable with the keyboard - #16145

Open
jaygeorge wants to merge 2 commits into
6.xfrom
16145-logic-tree-keyboard
Open

jaygeorge wants to merge 2 commits into
6.xfrom
16145-logic-tree-keyboard

Conversation

@jaygeorge

@jaygeorge jaygeorge commented Dec 1, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #16142.

Description of the Problem

You can't get around the logic tree with the keyboard. The page names and fields are only clickable, so Tab skips straight past them.

Esc also closes the whole inspector when you only meant to close a dropdown inside it, like the field picker in a page rule.

image

What this PR Does

  • Page names and fields are now buttons, so Tab reaches them in the order they sit on screen (column by column), and Enter or Space selects them. Fields get the usual focus outline around the whole cell.
  • Esc leaves an open dropdown, popover or modal to close itself, so a second Esc closes the inspector.
  • Closing the inspector puts focus back on the item that opened it, whether that's Esc or tapping the backdrop on mobile.!
logic-tree-keyboard.mp4

How to Reproduce

  1. Open a form's Logic tab and switch to the Tree view.
  2. Press Tab from the view toggle. Focus goes to the first page name, then each field.
  3. Press Enter on a field, then Esc. Focus comes back to that field.
  4. Open a Next Page button's Logic tab, open a dropdown in a rule and press Esc. Only the dropdown closes.

@jaygeorge
jaygeorge added this pull request to stack #16146 December 1, 2026 11:23
@jackmcdade
jackmcdade force-pushed the 16145-logic-tree-keyboard branch from 87b7745 to 6799c02 Compare December 4, 2026 19:47
Base automatically changed from 16142-logic-tree-page-buttons to 6.x December 4, 2026 19:49
- Page names and fields are buttons, so Tab reaches them in on-screen order
- Esc in a dropdown no longer closes the whole inspector
- Closing the inspector returns focus to the item that opened it, including the mobile backdrop
- Buttons centre their text vertically, which dropped names in the Expanded view
@jackmcdade
jackmcdade force-pushed the 16145-logic-tree-keyboard branch from 6799c02 to 47ffa83 Compare December 4, 2026 19:49

This branch has not been deployed

No deployments
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.

1 participant