Closed muffinresearch closed 6 years ago
@willdurand pointed out on irc that enter does open the drop-down, so this might be more a question of adding a focus style to the user button.
Would also be worth reviewing if there's any additional hinting we should be doing via aria attrs to provide additional hints to assistive tech.
On Chrome, this is what I observe when I use tab:
IIRC chrome adds a lot in terms of default focus styles - we may just need an explicit focus style added to fix making focus visible on FF (Also I'd be curious to know if we're turning any defaults off for FF in CSS that we shouldn't be). If you're using chrome to develop it would be recommended to switch to Firefox nightly to make sure you're seeing things the way a firefox user would since that's our primary audience.
Chrome adds a browser style for *:focus
, which uses outline
. This is also what Bootstrap does. An easy fix would be to add such a rule to have a consistent focus style on all browsers.
If you're using chrome to develop it would be recommended to switch to Firefox nightly to make sure you're seeing things the way a firefox user would since that's our primary audience.
I use Chrome, FF55 and FF Nightly.
I've looked at this a bit more closely and the weird part about it, is the span seems to get focus after the button.
Adding an explicit :focus
style to the button means you can see when the button is focused but as the span is focusable (no idea why) you also need to work around the span focus by adding tabindex="-1"
so that after the button the search box (or the links in the menu if the menu was opened are the next things to focus on).
QA notes:
Before the fix - you can't see the focus on the user button when tabbing to it when logged in. Also the span around the username can be focused (1 tab after focusing the button) which doesn't make any sense.
With the fix in play:
With the menu closed:
I'm going to file another bug to make the search input focus styles more noticeable.
I've filed a separate bug for the aria attributes: https://github.com/mozilla/addons/issues/10790
@muffinresearch : "More popular extensions", "Browse this collection", "More featured Themes" and "More trending extensions" are not focused while navigating with the keyboard. Also, the static panes which replaced the carousel are not highlighted when navigating with keyboard.
Please let me know if you want new issues or if we can track this here.
Verified as fixed. Logged another issue for the previous comment : mozilla/addons#10990
The dropdown user menu needs to be keyboard accessible otherwise those links are completely obscured to anyone that can't use a mouse.
The username menu should be focusable, and when focused that should open the menu and make it possible to tab down through the links.