Bug 208549

Summary: Web Inspector: AXI: can't leave Styles and Computed panels by pressing Tab
Product: WebKit Reporter: Nikita Vasilyev <nvasilyev>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, hi, inspector-bugzilla-changes, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
hi: review+
Patch none

Description Nikita Vasilyev 2020-03-03 17:04:14 PST
Once the focus is inside of the Styles or Computed panel, it's trapped there. You can't escape the panel by pressing Tab. Focus cycles inside the panel.


Steps:
1. Open Styles panel.
2. Focus on the filter field at the bottom of the sidebar.
3. Press Tab.

Expected:
Focus moves forward to "Classes" toggle button.

Actual:
Focus "cycles" back to the top of the sidebar - to the "Active" checkbox.


Steps:
1. Focus on the first checkbox - "Active".
2. Press Shift-Tab.

Expected:
Focus moves to "Styles" sidebar tab.

Actual:
Focus moves to the filter field at the bottom of the sidebar.
Comment 1 Radar WebKit Bug Importer 2020-03-03 17:04:34 PST
<rdar://problem/60020149>
Comment 2 Nikita Vasilyev 2020-03-03 17:18:59 PST
Created attachment 392354 [details]
Patch
Comment 3 Devin Rousso 2020-03-05 16:19:40 PST
Comment on attachment 392354 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=392354&action=review

r=me

> Source/WebInspectorUI/UserInterface/Views/GeneralStyleDetailsSidebarPanel.js:419
> +        if (event.shiftKey && this._panel.focusLastSection) {

Why not mimic `_handleForcedPseudoClassCheckboxKeydown` and have `if (event.key !== "Tab" || !event.shiftKey)` instead?  That way, `if (this._panel.focusLastSection)` lines up quite nicely with the `this._panel.focusLastSection();` on the next line :)
Comment 4 Nikita Vasilyev 2020-03-05 16:28:38 PST
Created attachment 392645 [details]
Patch
Comment 5 WebKit Commit Bot 2020-03-05 16:47:03 PST
Comment on attachment 392645 [details]
Patch

Clearing flags on attachment: 392645

Committed r257959: <https://trac.webkit.org/changeset/257959>
Comment 6 WebKit Commit Bot 2020-03-05 16:47:05 PST
All reviewed patches have been landed.  Closing bug.