Closed Bug 1979591 Opened 5 months ago Closed 5 months ago

Markup tree no longer gets focus when inspecting an element using the web page context menu

Categories

(DevTools :: Inspector, defect, P2)

defect

Tracking

(Accessibility Severity:s3, firefox-esr128 unaffected, firefox-esr140 fixed, firefox141 wontfix, firefox142 fixed, firefox143 fixed)

RESOLVED FIXED
143 Branch
Accessibility Severity s3
Tracking Status
firefox-esr128 --- unaffected
firefox-esr140 --- fixed
firefox141 --- wontfix
firefox142 --- fixed
firefox143 --- fixed

People

(Reporter: Jamie, Assigned: nchevobbe)

References

(Regression)

Details

(Keywords: access, regression)

Attachments

(3 files)

STR:

  1. Open:
    data:text/html,<button>foo
  2. Tab to the button.
  3. Press the context menu key and then q to choose "Inspect".
    • Expected: The markup tree should be focused, with the <button> element selected.
    • Actual: Focus goes to the <body> element of the Inspector.

This is a particularly annoying "papercut" for screen reader users, especially given the fairly intense tab order in the Inspector.

6:29.96 INFO: Last good revision: db6fa3774da68983838948254f8d89e62ef0392e
6:29.96 INFO: First bad revision: b78d8b61c13f9abd77f110e851edfe6135d97076
6:29.96 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=db6fa3774da68983838948254f8d89e62ef0392e&tochange=b78d8b61c13f9abd77f110e851edfe6135d97076

This implicates bug 1324254.

Accessibility Severity: --- → s3

Set release status flags based on info from the regressing bug 1324254

:nchevobbe, since you are the author of the regressor, bug 1324254, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

With changes in Bug 1324254, we set the selected node (and do focus it), as part of Toolbox#loadTool, but then, after loadTool settles, we call focusTool, which does focus the inspector iframe https://searchfox.org/mozilla-central/rev/45aff2630491c295fc6c28198b629ff2de14e637/devtools/client/framework/toolbox.js#2998,3045,3056-3057,3062-3063

selectTool(id, reason = "unknown", options) {
...
  return this.loadTool(id, options).then(panel => {
...
    // focus the tool's frame to start receiving key events
    this.focusTool(id);
...
  });
},

we need to orchestrate things a bit differently to avoid blurring the correct focus we're setting as part of loadTool.

Flags: needinfo?(nchevobbe)
Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED

If the inspector was opened from the Inspect context menu, the node gets selected
in the MarkupView constructor, but the Toolbox focuses the Inspector iframe once
the tool is loaded (and the iframe is actually visible), so we need to focus
the selected node after the inspector was properly selected and focused.

Severity: -- → S3
Priority: -- → P2
Pushed by nchevobbe@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/051a3071d09a https://hg.mozilla.org/integration/autoland/rev/5468e77b2eb3 [devtools] Properly focus Markup view when Inspector is opened via Inspect context menu. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 143 Branch

If the inspector was opened from the Inspect context menu, the node gets selected
in the MarkupView constructor, but the Toolbox focuses the Inspector iframe once
the tool is loaded (and the iframe is actually visible), so we need to focus
the selected node after the inspector was properly selected and focused.

Original Revision: https://phabricator.services.mozilla.com/D259039

Attachment #9504468 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined: using the "Inspect" context menu entry to open the Inspector won't focus the right element in DevTools, which can be frustrating for keyboard users
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: -
  • Risk associated with taking this patch: low
  • Explanation of risk level: small devtools only fix, covered by mochitest
  • String changes made/needed: -
  • Is Android affected?: no
Attachment #9504468 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Flags: in-testsuite+

If the inspector was opened from the Inspect context menu, the node gets selected
in the MarkupView constructor, but the Toolbox focuses the Inspector iframe once
the tool is loaded (and the iframe is actually visible), so we need to focus
the selected node after the inspector was properly selected and focused.

Original Revision: https://phabricator.services.mozilla.com/D259039

Attachment #9505635 - Flags: approval-mozilla-esr140?

firefox-esr140 Uplift Approval Request

  • User impact if declined: using the "Inspect" context menu entry to open the Inspector won't focus the right element in DevTools, which can be frustrating for keyboard users
  • Code covered by automated testing: yes
  • Fix verified in Nightly: no
  • Needs manual QE test: no
  • Steps to reproduce for manual QE testing: -
  • Risk associated with taking this patch: low
  • Explanation of risk level: small devtools only fix, covered by mochitest
  • String changes made/needed: -
  • Is Android affected?: no
Attachment #9505635 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
Attachment #9505635 - Flags: approval-mozilla-esr140+ → approval-mozilla-esr140?
Attachment #9505635 - Flags: approval-mozilla-esr140? → approval-mozilla-esr140+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: