Dialog button access key handling is broken for unmodified character keypress
Categories
(Toolkit :: XUL Widgets, defect, P2)
Tracking
()
People
(Reporter: dao, Assigned: thomas8)
References
(Depends on 1 open bug, Regression)
Details
(Keywords: access, regression, ux-efficiency)
Attachments
(2 files)
(deleted),
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr102+
|
Details |
(deleted),
text/x-phabricator-request
|
RyanVM
:
approval-mozilla-esr102+
|
Details |
This code expects documentElement
to be <dialog>
which isn't true anymore as of bug 1585482:
let buttonBox = window.top.document.documentElement.buttonBox;
Comment 1•5 years ago
|
||
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?
Reporter | ||
Comment 2•5 years ago
|
||
fireAccessKeyButton
looks for buttons with access keys within buttonBox, it doesn't expect buttonBox itself to have an access key:
https://searchfox.org/mozilla-central/rev/8526066f548af9ec3ebb462ff73c47ccc183f533/toolkit/content/widgets/button.js#210-230
Dialog button access keys are set here:
https://searchfox.org/mozilla-central/search?q=buttonaccesskey%5Ba-z%5D&case=true®exp=true
Updated•5 years ago
|
Reporter | ||
Comment 3•5 years ago
|
||
I might actually end up removing this code in bug 1626342...
Comment 4•5 years ago
|
||
(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.
Updated•4 years ago
|
Updated•3 years ago
|
Assignee | ||
Comment 11•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 12•2 years ago
|
||
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...
Comment 13•2 years ago
|
||
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.
Assignee | ||
Comment 14•2 years ago
|
||
(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
.
Comment 15•2 years ago
|
||
Updated•2 years ago
|
Comment 16•2 years ago
|
||
Comment 17•2 years ago
|
||
bugherder |
Comment 18•2 years ago
|
||
Assignee | ||
Comment 19•2 years ago
|
||
Awesome! Thanks Brian for landing my patch and adding the test!
Updated•2 years ago
|
Comment 20•2 years ago
|
||
bugherder |
Comment 21•2 years ago
|
||
Did you want to nominate this for ESR102 approval also?
Assignee | ||
Comment 22•2 years ago
|
||
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).
Assignee | ||
Updated•2 years ago
|
Comment 23•2 years ago
|
||
Comment on attachment 9291391 [details]
Bug 1625632 - Fix dialog button access key handling for unmodified keypress. r=bgrins
Approved for 102.5esr.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 24•2 years ago
|
||
bugherder uplift |
Description
•