Closed Bug 1414447 Opened 8 years ago Closed 8 years ago

Third-party devtools webextension panels not included in keyboard navigation

Categories

(DevTools :: Framework, defect, P3)

57 Branch
defect

Tracking

(firefox58 verified, firefox59 verified)

VERIFIED FIXED
Firefox 59
Tracking Status
firefox58 --- verified
firefox59 --- verified

People

(Reporter: marcy.sutton, Assigned: eeejay)

Details

Attachments

(1 file, 2 obsolete files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36 Steps to reproduce: -Install a third-party devtools addon in any recent version of Firefox (I could reproduce in Nightly and Developer Edition). -You can observe this behavior with one of the example extensions: https://github.com/mdn/webextensions-examples/tree/master/devtools-panels -Use the keyboard to cycle through devtools panels: `Cmd + }` (Mac) or `Ctrl + }` (Win) Actual results: The tab switcher code that cycles you through devtools tabs skips over third-party extensions, going from the last native panel straight to the devtools toolbox options button. This means that keyboard users can't get to third-party extensions. This happens on Mac and Windows. It looks like there's some devtools code that changes the tabindex of those tab buttons for an aria-activedescendant type experience, but the JavaScript that cycles you through them doesn't know about the dynamically added tab panels. Expected results: Devtools extensions should be reachable using keyboard shortcuts to cycle through all devtools panels.
Summary: Third-party devtools extension panels not included in keyboard navigation → Third-party devtools webextension panels not included in keyboard navigation
Component: Untriaged → Developer Tools
Yura, Is this something you fixed in the past? Is this a regression?
Flags: needinfo?(yzenevich)
I don't think I've touched any Cmd + }/{ shortcuts, but I would treat anything to do with tabs in DevTools as a regression as that component went through a rewrite from XUL to React, iirc.
Flags: needinfo?(yzenevich)
I didn't know about the ctrl+} shortcut before. I noticed that if you tab through the tool tabs the keyboard focus cycles through them correctly, but you can't activate the focused too. So that's bad too.
Attachment #8927499 - Flags: review?(jryans)
Assignee: nobody → eitan
Comment on attachment 8927499 [details] [diff] [review] Use a combined sorted list of toolbox items. Review of attachment 8927499 [details] [diff] [review]: ----------------------------------------------------------------- Thanks for working on this! :) Overall, the idea makes sense, but I'd like to avoid the data duplication as mentioned below. ::: devtools/client/framework/toolbox.js @@ +254,1 @@ > this.component.setPanelDefinitions(definitions); This data gets stored as part of the state of the `ToolboxController` React component. Instead of creating a copy local to this module, let's add an accessor for the existing data. In toolbox-controller.js, add something like: ``` getPanelDefinitions() { return this.state.panelDefinitions; } ``` and then when navigating tools in this module's `selectNextTool` etc., you can access the definitions with `this.component.getPanelDefinitions()`.
Attachment #8927499 - Flags: review?(jryans) → review-
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #5) > This data gets stored as part of the state of the `ToolboxController` React > component. > > Instead of creating a copy local to this module, let's add an accessor for > the existing data. Sounds good! I didn't originally do that because I thought react components are not supposed to leak state upwards, only to child components. I'm happy to add an accessor.
Attachment #8927499 - Attachment is obsolete: true
(In reply to Eitan Isaacson [:eeejay] from comment #6) > (In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #5) > > This data gets stored as part of the state of the `ToolboxController` React > > component. > > > > Instead of creating a copy local to this module, let's add an accessor for > > the existing data. > > Sounds good! I didn't originally do that because I thought react components > are not supposed to leak state upwards, only to child components. I'm happy > to add an accessor. Ah, I would probably agree in a more pure, React-only situation... In this case, it's feels more fuzzy to me, since we're dealing with wrapper components at the boundary between React and legacy UI components, so I don't feel like there's a clear policy to follow.
Comment on attachment 8927913 [details] [diff] [review] Use displayed definitions in toolbox component for kb nav. r?jryans Review of attachment 8927913 [details] [diff] [review]: ----------------------------------------------------------------- Thanks, this looks good to me! :)
Attachment #8927913 - Flags: review?(jryans) → review+
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Component: Developer Tools → Developer Tools: Framework
Priority: -- → P3
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #8) > (In reply to Eitan Isaacson [:eeejay] from comment #6) > > (In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #5) > > > This data gets stored as part of the state of the `ToolboxController` React > > > component. > > > > > > Instead of creating a copy local to this module, let's add an accessor for > > > the existing data. > > > > Sounds good! I didn't originally do that because I thought react components > > are not supposed to leak state upwards, only to child components. I'm happy > > to add an accessor. > > Ah, I would probably agree in a more pure, React-only situation... > > In this case, it's feels more fuzzy to me, since we're dealing with wrapper > components at the boundary between React and legacy UI components, so I > don't feel like there's a clear policy to follow. I guess ideally the component should be listening to the keypresses and updating its own state, but it sounds like this module is mid-transition.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/a0e98ae937a2 Use displayed definitions in toolbox component for kb nav. r=jryans
Keywords: checkin-needed
Comment on attachment 8927913 [details] [diff] [review] Use displayed definitions in toolbox component for kb nav. r?jryans Review of attachment 8927913 [details] [diff] [review]: ----------------------------------------------------------------- ::: devtools/client/framework/components/toolbox-controller.js @@ +147,5 @@ > this.updateButtonIds(); > } > > + get panelDefinitions() { > + retun this.state.panelDefinitions; Ran into this problem locally before the backout. I think it is the misspelling of retun here.
That's embarrassing.. i forgot to build locally before testing my changed patch.
Flags: needinfo?(eitan)
Fixed typo. And properly tested.
Attachment #8927913 - Attachment is obsolete: true
Keywords: checkin-needed
Pushed by ryanvm@gmail.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/b67b072f3c58 Use displayed definitions in toolbox component for kb nav. r=jryans
Keywords: checkin-needed
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 59
Comment on attachment 8928021 [details] [diff] [review] Use displayed definitions in toolbox component for kb nav. Approval Request Comment [Feature/Bug causing the regression]: devtools react rewrite [User impact if declined]: keyboard users cannot access addon devtools panels [Is this code covered by automated tests?]: No [Has the fix been verified in Nightly?]: Yes [Needs manual test from QE? If yes, steps to reproduce]: The STR is in the bug summary. [List of other uplifts needed for the feature/fix]: None [Is the change risky?]: No [Why is the change risky/not risky?]: It's a limited change that is easily tested. [String changes made/needed]: None.
Attachment #8928021 - Flags: approval-mozilla-beta?
Comment on attachment 8928021 [details] [diff] [review] Use displayed definitions in toolbox component for kb nav. Fix a userability issue when using devtools. Beta58+.
Attachment #8928021 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: qe-verify+
I managed to reproduce the bug using an older version of Nightly (2017-11-03) on Windows 10 x64. I installed DevTools Media Panel and when I tried to navigate with the keyboard shortcuts, it always skipped the "Media" panel. I retested everything on latest Nightly 59 and beta 58.0b5 on Windows 10x64, Ubuntu 16.04 x64 and Mac OS 10.11, but the bug is not reproducing anymore.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: