Closed Bug 1625632 Opened 5 years ago Closed 2 years ago

Dialog button access key handling is broken for unmodified character keypress

Categories

(Toolkit :: XUL Widgets, defect, P2)

defect

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
thunderbird_esr78 + wontfix
thunderbird_esr91 --- wontfix
thunderbird_esr102 --- fixed
firefox-esr91 --- wontfix
firefox-esr102 107+ fixed
firefox104 --- wontfix
firefox105 --- wontfix
firefox106 --- fixed

People

(Reporter: dao, Assigned: thomas8)

References

(Depends on 1 open bug, Regression)

Details

(Keywords: access, regression, ux-efficiency)

Attachments

(2 files)

This code expects documentElement to be <dialog> which isn't true anymore as of bug 1585482:

let buttonBox = window.top.document.documentElement.buttonBox;

https://searchfox.org/mozilla-central/rev/8526066f548af9ec3ebb462ff73c47ccc183f533/toolkit/content/widgets/button.js#109

It could be updated to something like this if we want to keep the same semantics:

let dialog = window.top.document.querySelector("dialog");
if (dialog && dialog.buttonBox) {
...
}

But, I don't see any acceskey attribute set on the buttonBox in https://searchfox.org/mozilla-central/rev/9c6e7500c0015a2c60be7b1b888261d95095ce27/toolkit/content/widgets/dialog.js#101-119, so perhaps this code should just be removed (along with the buttonBox getter in dialog as this seems to be the only consumer). Or am I missing something about how this gets wired up and this is actually causing a bug?

Flags: needinfo?(dao+bmo)
Priority: -- → P2

I might actually end up removing this code in bug 1626342...

Depends on: 1626342

(In reply to Dão Gottwald [::dao] from comment #3)

I might actually end up removing this code in bug 1626342...

That would be great if so, thanks.

Has Regression Range: --- → yes
Assignee: nobody → bugzilla2007
Status: NEW → ASSIGNED
Attachment #9291391 - Attachment description: WIP: Bug 1625632 - Fix dialog button access key handling for unmodified keypress. → Bug 1625632 - Fix dialog button access key handling for unmodified keypress. r=bgrins

2 years and 6 duplicates later, Thunderbird would love to see this fixed - I've attached a patch based on Brian's comment 1, which fixes the problem for me.

In terms of workflow, I guess we should have landed this one-liner much earlier regardless of future planned improvements (which haven't materialized yet), so that in the meantime, the problem is fixed and users benefit...

Severity: normal → S3
Summary: Dialog button access key handling is broken → Dialog button access key handling is broken for unmodified character keypress

The severity field for this bug is relatively low, S3. However, the bug has 6 duplicates.
:thomas8, could you consider increasing the bug severity?

For more information, please visit auto_nag documentation.

Flags: needinfo?(bugzilla2007)

(In reply to Release mgmt bot [:suhaib / :marco/ :calixte] from comment #13)

The severity field for this bug is relatively low, S3. However, the bug has 6 duplicates.
:thomas8, could you consider increasing the bug severity?

Thanks bot, considered and still right at S3. As much as we'd like to see this fixed asap, as it affects all such dialogs, it doesn't quite fit the definition of S2: (Serious) Major functionality/product severely impaired or a high impact issue and a satisfactory workaround does not exist.

Flags: needinfo?(bugzilla2007)
Attachment #9293394 - Attachment description: WIP: Bug 1625632 - Test for button element forwarding accesskey to dialog buttons → Bug 1625632 - Test for button element forwarding accesskey to dialog buttons;r=dao
Pushed by bgrinstead@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/7a25187ada41 Fix dialog button access key handling for unmodified keypress. r=bgrins
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
Pushed by bgrinstead@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8fca816e5d9f Test for button element forwarding accesskey to dialog buttons;r=dao

Awesome! Thanks Brian for landing my patch and adding the test!

Did you want to nominate this for ESR102 approval also?

Flags: needinfo?(bugzilla2007)

Comment on attachment 9291391 [details]
Bug 1625632 - Fix dialog button access key handling for unmodified keypress. r=bgrins

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: See user impact
  • User impact if declined: Breaks ages of muscle memory when pressing the unmodified access key of a dialog button unexpectedly fails. Also for Thunderbird where such dialogs may occur much more frequently.
  • Fix Landed on Version: 106
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Near zero risk as we're just updating a single selector (as dialogs are no longer root elements).
Flags: needinfo?(bugzilla2007)
Attachment #9291391 - Flags: approval-mozilla-esr102?
Attachment #9293394 - Flags: approval-mozilla-esr102?

Comment on attachment 9291391 [details]
Bug 1625632 - Fix dialog button access key handling for unmodified keypress. r=bgrins

Approved for 102.5esr.

Attachment #9291391 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+
Attachment #9293394 - Flags: approval-mozilla-esr102? → approval-mozilla-esr102+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: