Closed Bug 1570709 Opened 5 years ago Closed 5 years ago

about:logins "three-dots menu" always/immediately has its first entry focused, with prominent blue focus rect

Categories

(Firefox :: about:logins, defect, P1)

defect

Tracking

()

RESOLVED FIXED
Firefox 70
Tracking Status
firefox70 --- fixed

People

(Reporter: dholbert, Assigned: ntim)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [passwords:management] [skyline])

Attachments

(2 files)

STR:

  1. visit about:logins in Nightly.
  2. Click the three-dots-menu at top right of the page area.
  3. (optional) Try moving your mouse cursor up and down across the menu, and try hitting "enter".

ACTUAL RESULTS:
The first menu item ("Preferences") immediately gets focused, as can be seen by a prominent focus-rect that gets drawn around it. This focus rect doesn't go away even as I mouse around.
If you hit enter, "Preferences" menu-item gets activated.

EXPECTED RESULTS:
The menu should behave like menus elsewhere in Firefox - in particular:

  • that first item should not receive focus automatically
  • It should not get a blue focus rect when it does have focus (I don't see that behavior in other menus if I hit tab to change focus with the keyboard).
  • When it does have focus (e.g. if you hit "tab"), the focus should change if you mouse over to another menu item.
Summary: about:logins "three-dots menu" always/immediately has its first entry focused → about:logins "three-dots menu" always/immediately has its first entry focused, with prominent blue focus rect
Attached video screencast (deleted) —
Blocks: about-logins
Whiteboard: [passwords:management] [skyline]
Flags: needinfo?(ntim.bugs)
Priority: -- → P1
Regressed by: 1566321
Keywords: regression

Note that this is not a XUL menu like the top dropdown menus you get from the menu bar or the right-click menu on a page. It's custom-built, thus the current differences in behavior. And it follows the WAI-ARIA menu button pattern, at least what the keyboard is concerned. So when activating the menu button via the keyboard, it is totally appropriate to focus the first item.

Also NI'ing Jamie for any further thoughts.

Flags: needinfo?(jteh)

For keyboard users, I tend to feel focusing the first menu item is correct behaviour. Otherwise, keyboard users need to pointlessly press down arrow to get to the first menu item after they've already pressed a key to open the menu. That said, there is a lot of hate for focusing the first item for mouse users.

The intuitive fix here is to only do this for keyboard users. However, the problem is that most screen reader users will be using document browse mode when they press this button, so the screen reader will click rather than sending the key press. (Screen readers do this in order to support broken controls which don't have proper keyboard support, and unfortunately, there are enough of these that this behaviour is not going to change any time soon.) That means we can't rely on distinguishing between keyboard and mouse to know what to do here, though there may be ways around that. (Marco, I vaguely recall IRCCloud ended up finding a way to detect this?)

If we must, I think we can live with the first menu item not being focused. Once the menu appears, screen readers should detect that and switch to focus mode. From there, they can press down arrow to get to the first item. That doesn't conform to the ARIA pattern, but it's better than completely reverting this patch.

Flags: needinfo?(jteh)
Flags: needinfo?(ntim.bugs)
Assignee: nobody → ntim.bugs
Pushed by jwein@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9a4fce239b25 Make menu-button focus behaviour more consistent with other browser menus. r=jaws
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla70
Blocks: 1570713
Component: Password Manager → about:logins
Product: Toolkit → Firefox
Target Milestone: mozilla70 → Firefox 70
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: