Closed Bug 2070955 Opened 3 days ago Closed 1 day ago

The object tree in the debugger's variable preview popup is not keyboard operable

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox158 fixed)

RESOLVED FIXED
158 Branch
Tracking Status
firefox158 --- fixed

People

(Reporter: florian, Assigned: florian)

References

(Blocks 2 open bugs)

Details

Attachments

(1 file)

Hovering a variable in the debugger's editor shows a preview popup containing an object tree whose rows expand to inspect nested values. Clicking a row already moves DOM focus to the tree container, and the container is a role="tree" with tabindex="0", so a user who has clicked into the popup is focused on a control that announces a tree and then ignores every key. That is a WCAG 2.1.1 Keyboard failure.

Popup.js renders the ObjectInspector with focusable: false, which becomes onFocus: null on the underlying Tree. Tree's focused prop can therefore never be set, and Tree._onKeyDown returns on its first line while it is null, making every arrow key, Home, End, Enter and Space a no-op.

Dropping focusable: false fixes it: after a click the row becomes the tree's aria-activedescendant and the arrow keys walk the tree. Verified against browser_dbg-preview.js, which already expands a property in the popup by clicking a twisty.

ObjectInspector turns focusable: false into onFocus: null, and Popup.js is its
only caller, so no item in the popup's tree ever becomes focused and
Tree._onKeyDown returns on its first line: a role="tree" that a click focuses and
every key ignores. Bug 2070909 names an active descendant only on a tree that
manages focus, so this also makes the popup's rows satisfy the keyboard
focusability check, retiring the Bug 1849028 annotations dropped here.

Assignee: nobody → florian
Status: NEW → ASSIGNED
Pushed by fqueze@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/cf40a6341581 https://hg.mozilla.org/integration/autoland/rev/28916995ee79 Let the variable preview popup's object tree manage focus, r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 1 day ago
Resolution: --- → FIXED
Target Milestone: --- → 158 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: