Closed Bug 1716962 Opened 3 years ago Closed 3 years ago

prevent conflicts between accesskeys for Folder Pane Toolbar context menu and toolbar menu and keyboard shortcuts

Categories

(Thunderbird :: Folder and Message Lists, defect)

defect

Tracking

(thunderbird_esr78 unaffected, thunderbird88 wontfix, thunderbird89 wontfix, thunderbird90 affected, thunderbird91? fixed)

RESOLVED FIXED
92 Branch
Tracking Status
thunderbird_esr78 --- unaffected
thunderbird88 --- wontfix
thunderbird89 --- wontfix
thunderbird90 --- affected
thunderbird91 ? fixed

People

(Reporter: aryx, Assigned: aleca)

References

(Regression)

Details

Attachments

(2 files)

Daily 91.0a1 20210616102713 on Windows 8.1

Thunderbird should prevent conflicts between access keys for the Folder Pane Toolbar context menu and its main toolbar menu and keyboard shortcuts. E.g. the 'H' accesskey with the menu open will call the menu item to hide the toolbar and open the 'Help' menu. If more menu items than 'All Folders' are active, just pressing 'A' won't hide the 'All Folders' view but archive the currently selected message (this is the default behavior for normal menus: just pressing the key is sufficient to trigger the access key).

Flags: needinfo?(alessandro)

Good finding, thanks for the report.

Since accesskeys are localized, we can't really control this unfortunately, so I think would be better to remove those accesskeys from the Folder Pane Toolbar doorhanger menu to avoid further issues.
That menu should also be made accessible via keyboard to mitigate the absence of accesskeys.

Any other possible approaches or suggestions?

Assignee: nobody → alessandro
Flags: needinfo?(alessandro)

Thomas, what do you think about this?

My idea to improve this and fix the conflict issue is to:

  • Remove the accesskeys from the toolbarbuttons
  • Implement the same keypress events we did for the #extraRecipientsPanel
  • Add the #buttonFolderList button to the focus ring if the toolbar is visible

This will ensure full keyboard accessibility to that popup menu without relying on access keys, effectively creating feature parity with what we have in the extra recipients popup panel in the messenger compose.

Flags: needinfo?(bugzilla2007)

(In reply to Alessandro Castellani [:aleca] from comment #2)

Thomas, what do you think about this?

My idea to improve this and fix the conflict issue is to:

  • Remove the accesskeys from the toolbarbuttons

No, we shouldn't have to do that (see below).

  • Implement the same keypress events we did for the #extraRecipientsPanel

Not a good idea to spread the hack - instead, let's find out what's wrong with our menu popups that they don't have proper accessibility out of the box? (more below).

  • Add the #buttonFolderList button to the focus ring if the toolbar is visible

That sounds good.

Right, there are several things which are wrong with this bug:

  • This bug does not have clear STR, actual result, expected result - that's how we end up in fuzziness and wrong conclusions.
  • User expectations from implicit STR in this bug.
  • XUL elements used to implement the current #folderListPopup.

I'll explain in my next comments.

Flags: needinfo?(bugzilla2007)

STR:

  1. From 3pane view: View > Folder Pane Toolbar
  2. Select a message
  3. Click triple-dot context menu button
  4. Press H (correct access key for Hide Toolbar - no Alt-key must be used inside a menu)
  5. Press A (correct access key for All Folders)

Actual

  • H does nothing (Alt+* combos are only to open main menu bar items, not to be used inside an open menu)
  • A leaks to underlying document and archives selected message - cunning bug

Expected

  • Access keys should work and apply to the currently open menu only:
    • H -> Hide toolbar
    • A -> toggle All Folders item (if not disabled)
  • Technically, the whole keyboard machinery for navigation and access keys fails here because we are using <panel> and <toolbarbuttons> instead of <menupopup> and <menuitems> - with the latter, keyboard navigation and access keys all work correctly out of the box.
  • We want to keep menu open for selecting multiple options, maybe closemenu="none" on <menu> or <menuitem>
  • Also ensure that menu closes when user clicks outside the menu (e.g. onblur).
  • Fwiw, reporter's expectation that Alt+H should act as access key inside the menu was not correct - Alt+H is actually supposed to open main menu's help menu, so that looks correct. The problem is about not responding to navigation and leaking unmodified single-char access keys to the document (where they can act as single-letter shortcut) or ignoring them.
Flags: needinfo?(alessandro)

Great analysis, as usual :D

Technically, the whole keyboard machinery for navigation and access keys fails here because we are using <panel> and <toolbarbuttons> instead of <menupopup> and <menuitems>

I guess we should update those elements.

Flags: needinfo?(alessandro)
Status: NEW → ASSIGNED
Target Milestone: --- → 92 Branch

Pushed by thunderbird@calypsoblue.org:
https://hg.mozilla.org/comm-central/rev/116543deed45
Replace panel element with menupopup for folder pane toolbar and fix keyboard a11y. r=ThomasD
https://hg.mozilla.org/comm-central/rev/5948875ca52f
Style the menuitems in the arrow popup. r=aleca

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED

Comment on attachment 9231071 [details]
Bug 1716962 - Replace panel element with menupopup for folder pane toolbar and fix keyboard a11y. r=ThomasD

[Approval Request Comment]
Regression caused by (bug #): -
User impact if declined: Lack of keyboard accessibility and focus ring of the Folder Pane modes popup
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9231071 - Flags: approval-comm-beta?

Comment on attachment 9231331 [details]
Bug 1716962 - Style the menuitems in the arrow popup. r=aleca

[Approval Request Comment]
Regression caused by (bug #): -
User impact if declined: Wrong styling for the menupopup element
Testing completed (on c-c, etc.): on c-c
Risk to taking this patch (and alternatives if risky): low

Attachment #9231331 - Flags: approval-comm-beta?

Any downside to deferring this to b5, i.e. not putting it in Monday's b4?

Comment on attachment 9231331 [details]
Bug 1716962 - Style the menuitems in the arrow popup. r=aleca

[Triage Comment]
Approved for beta

Attachment #9231331 - Flags: approval-comm-beta? → approval-comm-beta+

Comment on attachment 9231071 [details]
Bug 1716962 - Replace panel element with menupopup for folder pane toolbar and fix keyboard a11y. r=ThomasD

[Triage Comment]
Approved for beta

Attachment #9231071 - Flags: approval-comm-beta? → approval-comm-beta+
Regressions: 1722410
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: