#19088 closed defect (bug) (fixed)
Accessibility for the admin bar
Reported by: | azaozz | Owned by: | azaozz |
---|---|---|---|
Milestone: | 3.3 | Priority: | normal |
Severity: | normal | Version: | 3.3 |
Component: | Toolbar | Keywords: | ux-feedback |
Focuses: | Cc: |
Description
The admin bar is currently not accessible when "tabbing" through any screen it's shown on. We need some sort of keyboard shortcuts or at least need to make the tab key work.
Attachments (4)
Change History (48)
#2
@
13 years ago
- Cc info@… added
Oh yes please. :)
The menus in the horizontal and vertical navigations and the Howdy dropdown are nearly inaccessible for keyboard users in 3.3. This is solved much better in 3.2.
Edit: Keyboard shortcuts are not a solution. Most single letter shortcuts are already taken in screen readers and customized browsers like Opera.
#3
@
13 years ago
There appears to be no change in tabbing behavior between 3.2 and 3.3 (in either the admin menu or the admin bar). It could be better, though.
What would an ideal solution look like?
#4
@
13 years ago
In 3.2 the submenus open on focus. In 3.3 they don’t. This problem is worse now because you cannot keep the most used menus open any longer.
A strong visual focus indicator is missing too. No problem in Opera – but in Firefox it is nearly impossible to tell where the current focus is.
#6
@
13 years ago
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed
In [19162]:
#7
follow-up:
↓ 10
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Looks like a good start. I've been testing in Chrome and found a few bugs:
- Top-level tabs without children aren't highlighted.
- Shift+tabbing causes menus to remain expanded.
- Menus expanded by tabbing can be collapsed by mousing over the menu, but can leave the parent item focused.
- No-JS: Top-level tabs with children are highlighted, but do not expand.
- When the W menu is highlighted, the W logo is not visible.
- It is possible to highlight your the name/username item in the account menu (which leads to nowhere) — I will fix this bug.
- Right-aligned menu items are highlighted before/between left-aligned menu items — I will fix this bug.
#8
@
13 years ago
- Command + clicking on top-level items with children can cause menus to remain expanded and/or the item to remain focused.
#9
@
13 years ago
Why the tabindex? It isn’t needed usually, and since the search field is visible on the front-end only it may interfere with the theme’s tabindex order.
#10
in reply to:
↑ 7
@
13 years ago
Replying to koopersmith:
I've been testing in Chrome and found a few bugs:
Unfortunately the admin bar was coded/styled without accessibility in mind. That makes it hard to get tabbing to work properly. As you see had to use JS to keep the drop-downs open. Also the "main" styling is on the <li>
elements instead of the links and tabbing must highlight the links (so pressing Enter would follow them).
There are few things that can be done to make this (at least) look better. However it's too late in the dev. cycle to try and re-make it now.
- Top-level tabs without children aren't highlighted.
Move the styling to the links.
- Shift+tabbing causes menus to remain expanded.
This doesn't seem to happen in FF, IE and Chrome on Windows. Menus are closed after a short timeout whether you tab forward or backward (Shift + Tab).
- Menus expanded by tabbing can be collapsed by mousing over the menu, but can leave the parent item focused.
I suppose that's expected behavior, closing the menu by mousing over it should leave the parent highlighted and allow tabbing to continue from there.
- No-JS: Top-level tabs with children are highlighted, but do not expand.
Yes, tabbing requires jQuery. See above.
- When the W menu is highlighted, the W logo is not visible.
See #1.
- It is possible to highlight your the name/username item in the account menu (which leads to nowhere) — I will fix this bug.
Proper way to fix that would be to allow passing a tabindex
var to the menu generating code and set that to -1.
- Right-aligned menu items are highlighted before/between left-aligned menu items — I will fix this bug.
This depends on the order the HTML elements are outputted. Tabbing follows the HTML layout not the visual.
- Command + clicking on top-level items with children can cause menus to remain expanded and/or the item to remain focused.
Any type of clicking would usually focus the item (link), that depends on the browser. Not sure we can do anything better with the JS for closing the menus (hovering over them and out actually closes them as you point out above).
We can make the JS there more complicated and add edge cases handling, however IMHO we should try to build/rebuild it with accessibility in mind instead of trying to "patch" it with JS.
Ideally the admin bar shouldn't need JS to be accessible similar to the admin menu.
#11
@
13 years ago
Tabbing works ok, except for menus without children, i.e. 'Comments', 'Edit post' etc.
#13
follow-up:
↓ 17
@
13 years ago
- Severity changed from normal to blocker
The tab indexes are going to cause a lot of problems.
In Chrome:
- Posts -> Add New
- Enter a title.
- Hit tab.
Expected:
- You end up in the content area.
Actual:
- The profile dropdown in the admin bar opens.
Whoops. :-)
#14
@
13 years ago
notice :focus state on WP logo was being override by another style. see screenshots on #19183 and attachment above. Comments :focus state still needs to be dealt with.
#17
in reply to:
↑ 13
@
13 years ago
- Severity changed from blocker to normal
Replying to nacin:
Fixed, not a blocker then?
#21
@
13 years ago
- Keywords needs-patch added
Sub-submenus aren't accessible via tabbing, see my sites item.
#23
follow-up:
↓ 26
@
13 years ago
Tabbing behaviour in the admin toolbar differs between the admin area and the front end. In the admin area it opens up and cycles through every submenu, on the front end it doesn't. Is this intentional?
#24
follow-up:
↓ 25
@
13 years ago
Shift-tabbing in the admin area also produces different behaviour to tabbing. Shift-tabbing only cycles over the top level menu items, whereas tabbing cycles over every submenu item.
#25
in reply to:
↑ 24
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Replying to johnbillion:
Shift-tabbing in the admin area also produces different behaviour to tabbing. Shift-tabbing only cycles over the top level menu items, whereas tabbing cycles over every submenu item.
#26
in reply to:
↑ 23
@
13 years ago
Replying to johnbillion:
Tabbing behaviour in the admin toolbar differs between the admin area and the front end.
Unfortunately tabbing is extended with jQuery so if the front-end doesn't load it, tabbing won't work the same as in the back end.
Shift-tabbing in the admin area also produces different behaviour to tabbing.
The JS "helper" for tabbing emulates the press-enter-to-open for the active menu. Currently the JS helper removes the "press-enter" bit and opens the submenu as soon as the user tabs to the top menu. Tabbing backwards (shift+tab) works in exactly the same way, it opens the submenu when the user tabs to the top menu.
Actually was testing full emulation of press-enter-to-open (i.e. the user will have to press Enter to open submenus, not opening them automatically) that would probably be more natural for tabbing.
#27
follow-up:
↓ 29
@
13 years ago
- Keywords ux-feedback reporter-feedback added; needs-patch removed
admin-bar.dev.js.patch changes the tabbing to behave as if the admin bar menus were click-to-open. When tabbing the user has to press Enter to open/close each submenu. This is better UX (imho) as it's identical to the standard browser behavior.
#29
in reply to:
↑ 27
;
follow-up:
↓ 30
@
13 years ago
Replying to azaozz:
admin-bar.dev.js.patch changes the tabbing to behave as if the admin bar menus were click-to-open. When tabbing the user has to press Enter to open/close each submenu.
I prefer this behaviour, but it does make it impossible to select the top level menu item.
I was more concerned that the front end and back end tabbing behaviour is different (if jQuery isn't present), but actually it's not the end of the world because the user can hit enter on the admin link and then tab through all the menu items once they're in the admin area.
#30
in reply to:
↑ 29
;
follow-up:
↓ 31
@
13 years ago
Replying to johnbillion:
I prefer this behaviour, but it does make it impossible to select the top level menu item.
Yes, but the top level menu "action" is the same as the first submenu item, so nothing is lost (the JS doesn't touch top menus without a submenu).
I was more concerned that the front end and back end tabbing behaviour is different (if jQuery isn't present), but actually it's not the end of the world because the user can hit enter on the admin link and then tab through all the menu items once they're in the admin area.
Right. In irc we were talking about loading jQuery on the front end for logged in users (as the admin bar shows only for them). This has the potential to bring errors, break (old) JS in the theme that hasn't been updated to use jQuery 1.6+, etc. so decided to leave it for 3.4. We probably can try "lazy-loading" jQuery only if it hasn't been loaded already, etc.
#31
in reply to:
↑ 30
@
13 years ago
Replying to azaozz:
Yes, but the top level menu "action" is the same as the first submenu item, so nothing is lost (the JS doesn't touch top menus without a submenu).
The exception to this is the My Sites menu.
#33
follow-up:
↓ 34
@
13 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Jane never indicated a preference here. Let's not rush.
#34
in reply to:
↑ 33
;
follow-up:
↓ 35
@
13 years ago
Replying to nacin:
Jane never indicated a preference here. Let's not rush.
I believe I said in IRC that my preference was for tabbing to cycle through all choices so enter would be equal to clicking an actual link, but that given our timing, we should do whatever was easiest that wouldn't screw anyone. Worth getting an opinion from people focused on accessibility, I think. Will post something.
#35
in reply to:
↑ 34
@
13 years ago
Replying to jane:
Will post something.
Posted at the make/accessibility blog to get feedback from experts in the field. Please, let's let the target demo be the talkers there and not have a migration of the people already on this ticket over that thread. Looking for NEW input there that we can bring over here. Devs already posting on this Trac ticket are asked to refrain from jumping in on the make/accessibility blog to keep the focus there on what that group has to say.
I know I said that twice, sorry. Just really want that space to be for accessibility people, the same way we work to keep wpdevel for devs.
#36
follow-ups:
↓ 37
↓ 39
@
13 years ago
Open on enter is counter-intuitive (for me), is feels … risky, because clicking enter opens a new page on all other sites.
#37
in reply to:
↑ 36
@
13 years ago
Replying to toscho:
Open on enter is counter-intuitive (for me), is feels … risky, because clicking enter opens a new page on all other sites.
That was my guiding principal as well, but waiting to see if the experts correct that assumption. Sadly non-experts (devs and designers who just have an opinion or gut instinct) are filing up the thread on the accessibility blog despite being asked to refrain, so today I will email some accessibility people directly and ask their opinions.
#38
@
13 years ago
- Resolution set to fixed
- Status changed from reopened to closed
Clear winner on the accessibility blog seems to be tab+enter. I stand corrected!
Closing as fixed.
#39
in reply to:
↑ 36
;
follow-up:
↓ 40
@
13 years ago
Replying to toscho:
Open on enter is counter-intuitive (for me), is feels … risky, because clicking enter opens a new page on all other sites.
Could you link some examples? In most menus I've seen Enter opens the sumbenu if any or "activates" the action if no submenu (like gmail). That's what we have at the moment.
Still thinking we can improve this: perhaps Shift+Enter to follow the link and of course adding ARIA as suggested on the accessibility blog. Both of these shouldn't take long to code once we decide to go ahead.
#40
in reply to:
↑ 39
;
follow-up:
↓ 41
@
13 years ago
Replying to azaozz:
Replying to toscho:
Open on enter is counter-intuitive (for me), is feels … risky, because clicking enter opens a new page on all other sites.
Could you link some examples?
http://www.scientificamerican.com/
In most menus I've seen Enter opens the sumbenu if any or "activates" the action if no submenu (like gmail). That's what we have at the moment.
From my (not representative) experience it is often just not predictable. A menu that opens on focus is predictable – you don’t have to guess, because the effect is visible immediately. And it is one key stroke less.
An online survey or other statistics cannot beat that simple logic. :)
#41
in reply to:
↑ 40
;
follow-up:
↓ 42
@
13 years ago
Replying to toscho:
All nice sites... But only one (msn) has something similar to our old menu behavior (auto-open on tab then tab through the submenu, when tabbing backwards don't tab through the submenus). All the rest don't show submenus or deal in any other way with menu accessibility when tabbing, most have alternate navigation links in the footer.
#42
in reply to:
↑ 41
;
follow-up:
↓ 43
@
13 years ago
Replying to azaozz:
My point was not to find sites with the same menu, but to illustrate how hard it is for a keyboard user to know how links work before clicking on them. I think, we should look at this in context: The other menus in the left hand navigation are harder to use in 3.3, because the user cannot control anymore which submenus will stay open and which will be closed. This is already frustrating enough, we shouldn’t add more clicks to this.
Plus, the submenus in the left navigation do not open on click, they force a page load. Making a click working different on the admin bar and on the left menu will raise the learning curve again.
Make the handling of all elements as simple as possible, remove any situation where the user has to guess and any additional key stroke.
#43
in reply to:
↑ 42
;
follow-up:
↓ 44
@
13 years ago
Replying to toscho:
...The other menus in the left hand navigation are harder to use in 3.3
...
Make the handling of all elements as simple as possible, remove any situation where the user has to guess and any additional key stroke.
Agreed, adding "flyouts" to the unfolded left menu made it harder for tabbing. Perhaps we should add the same JS helper there and make it behave like the top menu. That will also make that menu almost the same as in 3.2 when tabbing.
In any case thinking we should add some ARIA args to both menus. That will be big accessibility enhancement.
#44
in reply to:
↑ 43
@
13 years ago
Replying to azaozz:
In any case thinking we should add some ARIA args to both menus. That will be big accessibility enhancement.
After chatting with @azaozz in IRC and reading up on ARIA landmarks and roles, it looks like it can be as simple as adding navigation roles to the admin bar and admin menu. According to this Landmark testing chart from August 2011, the navigation role should be supported on the major screen readers nearly across the board.
See attachment:ARIA.menu.roles.patch and attachment:menu.roles.example.png
We need to enable tabbing more than we need more bespoke keyboard shortcuts. Tabbing is how keyboard users expect to get around the screen.