Problem/Motivation

The builder cannot be operated without a mouse. Verified on /admin/structure/page-layout/default/builder in Chromium, on 1.0.x.

1. Placing and reordering is drag-only

Placement and ordering exist only as pointer drags (SortableJS in components/draggables/draggables.js and components/dropzone/dropzone.js), committed by an HTMX dragend trigger in src/HtmxEvents.php. The contextual menu offers copy, paste, duplicate, remove, save as preset and styles: there is no move, no reorder, no "send to slot" anywhere in the UI, and no route for a positional move other than the two drop endpoints.

2. A node can be focused but not selected

Canvas nodes and dropzones are tabindex="0", but selection is bound to click. Pressing Enter on a focused node does nothing: the contextual drawer stays closed. As a result the node-scoped shortcuts we ship (mod+c, mod+v, mod+d, Delete) are unreachable, because nothing can become the selection without a pointer. The contextual menu listens to the contextmenu event only, with no Shift+F10 or ContextMenu key path.

3. The canvas has no accessible semantics

A single placed component produces 30 focusable dropzones, all div elements with no role, no aria-label and no accessible name. A screen reader user tabs through thirty anonymous stops that do nothing.

4. Focus and state are not managed elsewhere either

  • Drawers: components/display_builder/js/sidebar.js contains no focus() call at all. Opening a drawer does not move focus into it, closing does not restore focus to the trigger, the aside elements carry no role or label, and the triggers expose no aria-expanded. Escape does close them.
  • Sidebar resize handles are mouse-only (mousedown/mousemove/mouseup), with no tabindex and no role="separator". The Canvas/Preview split handle is already correct and is the model to copy.
  • The save indicator is a role="status" whose text content is empty: the state lives in a title on an aria-hidden dot, so it announces nothing. Contextual form submissions announce nothing either. The toast stack, by contrast, is a correct polite live region.
  • The toolbar has no role="toolbar" and no label, and every button is a separate tab stop: 12 stops between the page and the canvas, after Drupal's own admin toolbar. There are no landmarks on toolbar, main or the drawers, and no way to jump between regions.
  • The keyboard shortcut list is only available inside a hover tooltip on the Help button.

Against the standard we target

Drupal core targets WCAG 2.2 AA for administrative interfaces and applies ATAG 2.0 to authoring experiences: https://www.drupal.org/about/features/accessibility

Why our tests did not catch this

The axe spec is green and stays green through all of the above. It runs on a single page state, and its own fixture places a component with a mouse drag.
Automated rules report none of these findings: they are operability and semantics problems, not rule violations on static markup.

Two things are already right, and should stay: every toolbar target is at least 24x24 CSS px (2.5.8 met), and the toast stack is a correct role="status" live region.

Proposed resolution

Ten child issues. The first three are conformance blockers and should gate RC1; the rest can follow.

  1. Select and open a component from the keyboard. Enter and Space select a focused node and open the contextual drawer. Shift+F10 and the ContextMenu key open the contextual menu at that node. Escape returns focus to the node.
  2. Move and reorder without dragging. Move up, move down and move into a chosen slot, from the contextual menu and the Navigator, mapped onto SourceTree::moveToRoot() and ::moveToSlot(): the same API the drop endpoints already call. Adding to an empty slot is covered by #3569389: Improve UX for adding content to empty slots; this issue covers moving and reordering what is already placed. Depends on the first child.
  3. Name the canvas. Roles and accessible names for nodes and slots, and stop making empty dropzones tab stops when they carry no action.
  4. Drawers. Labels, aria-expanded on the triggers, focus moved into the panel on open and restored to the trigger on close, keeping the existing Escape chain.
  5. Resize handles. Make the sidebar handles keyboard operable, copying the split handle: role="separator", arrows, Home, End, Enter.
  6. Announce state. Real text in the save status region, and one polite announcement for the result of a contextual form submission.
  7. Toolbar and regions. The APG toolbar pattern (one tab stop, arrow keys between controls), landmarks on toolbar, main and drawers, and a region navigation key. Verify 2.4.11 while there: a focused element must never be entirely hidden under the sticky toolbar.
  8. Shortcuts. A shortcuts dialog instead of a hover tooltip, combos shown beside their commands, and a registry a test can read to fail on a collision.
  9. Dropdown semantics. aria-haspopup and aria-expanded in both states, set once in the dropdown component for every menu, and menu items that navigate rendered as real links rather than an inline onclick.
  10. Test harness and documentation. axe over more states (drawer open, contextual form, contextual menu, split preview, Scaffold, Navigator), a keyboard-only spec that builds and reorders a layout, an accessibility page for authors stating the target and the known gaps, plus an audit of the colour-only signals (dropzone highlight, selected outline, Highlight island) against 1.4.1.

Rules for every child: it ships with the test that proves it, keyboard work is verified by a run that uses no pointer events, and the KNOWN_VIOLATIONS list in the axe spec stays empty. The keyboard-only spec from the tenth child is written first and serves as the acceptance test for the first two.

Remaining tasks

  • Confirm the target we state publicly: WCAG 2.2 AA alone, or AA plus ATAG 2.0 Part A.
  • Decide whether move controls live in the contextual menu only, or also as always-visible per-node buttons. Always visible is more discoverable and helps pointer users with motor impairments, at the cost of chrome on every node.
  • Decide how the slot target is chosen: a submenu of slots, or a move mode driven by arrow keys.
  • Decide whether a command palette is in scope. It would also serve region navigation and move commands for expert users, but it can never be the only path.
  • Decide whether the first three children gate RC1, or the release ships with the gap documented.
  • Open the ten children and link them here.
  • Sequence the dropdown semantics child against #3616153: Plan: Migrate from Shoelace to Webawesome: fixing Shoelace shadow DOM behaviour before the Web Awesome migration means doing it twice.

User interface changes

New move commands in the contextual menu and the Navigator, a shortcuts dialog replacing the Help tooltip content, keyboard focus moving into drawers when they open, and possibly per-node move buttons depending on the decision above.

API changes

None expected. Move commands reuse the existing SourceTree methods and the existing API routes.

Data model changes

None.

Three notes on what I put in: the findings carry file paths and the measured numbers (30 dropzones, 12 tab stops) so a reviewer can reproduce them, the "why our tests did not catch this" section pre-empts the "but axe is green" reply, and I kept the two things that are already correct, since a plan issue that only lists faults invites argument about whether it's fair.

Related issues

Comments

mogtofu33 created an issue. See original summary.

mogtofu33’s picture

Title: Builder accessibility and UX: issue plan » Plan: Builder accessibility and UX
mogtofu33’s picture

Issue tags: -AI-accelerated, -RC blocker