Toolbar module has a number of accessibility issues. Some of these may be addressed individually in child issues, but it will be a good idea to consider them holistically.
Known problems
Visual design
- #3097907: Active toolbar tray has weak affordance and fails WCAG color criteria
- #3097905: Add visual indicator to show which toolbar buttons have trays associated with them
- Confusing visual focus order. MAJOR. Visually, the top level toolbar has some buttons which appear on the right hand side (e.g. edit, tour). The DOM order differs from the visual presentation, so focus order jumps around in a way that's confusing for sighted users. Effectively a failure of WCAG success criterion 2.4.3 Focus Order (level A). Aim to find an order which is usable by screen reader users and sighted users. #3167438: Presentation of some toolbar buttons differs from DOM order
- Missing icons in Windows high-contrast mode. #3269420: Toolbar icons may not meet contrast when in forced colors mode The icons are CSS background images, which don't work when a Windows' high-contrast theme is enabled. Internet Explorer and Firefox both strip CSS background images out, but Edge displays them. (Other browsers don't respect Windows high-contrast mode at all, which is something beyond our control). This issue can be addressed by using an alternative technique such as inline
<img>/<svg>, or the CSScontentproperty.However some buttons are badly broken, because visually they are just an icon. When the icon is missing users can't perceive or understand the button:
- Many cases are OK, because the icon is accompanied by a visible text label. When the icon is missing, the link or button is still perceivable because the text label remains. It would be better if the icons weren't missing.
- Switch toolbar orientation. Visually this is just an icon. In high-contrast mode, when the icon is missing, users may be completely unaware that the toolbar orientation can be changed, or can't find how to do it. MAJOR, fails WCAG SC 1.1.1 Non-text Content (level A) for the high-contrast scenario.
- Sub-menu buttons in vertically-orientated trays. Visually this is just an icon. In high-contrast mode, when the icon is missing, users may not understand the hierarchy of an open menu, and may be completely unaware that more links can be disclosed. MAJOR, fails WCAG SC 1.1.1 Non-text Content (level A) for the high-contrast scenario.
Assisitive technology and Semantics
- #3066954: Admin toolbar not usable with latest versions of JAWS due to mis-use of aria-owns. CRITICAL. Fixed in 8.7.9.
- #3085781: aria-pressed attribute isn't updated correctly.. MAJOR.
- #3085811: Toolbar buttons should respond to spacebar key. These are
<a href="" role="button">which only responds to the return key. It needs an extra keyboard handler. Spotted in #3066954: Admin toolbar not usable with latest versions of JAWS due to mis-use of aria-owns. - #3090120: Improve accessibility semantics for Toolbar buttons with trays
- #3093378: Use ARIA disclosure pattern for submenu buttons in vertical toolbar orientation
- Too many ARIA group/landmark roles. #3509700: Accessibility of landmark regions in toolbar The toolbar uses lots of ARIA navigation landmarks. In general, it's a good idea to avoid using to many landmark regions because it reduces their usefulness. They are used to quickly navigate between major regions of the page, and too many of them can make it tedious to cycle among them.
- Consider just using a single navigation landmark for the entire toolbar, and eliminate the nested ones. Possibly use another non-landmark grouping role inside the toolbar. The nested menus already have
- The toolbar is wrapped by an ARIA group (not a landmark) and a navigation role, each with their own label. This double wrapper doesn't serve much purpose, it merely increases verbosity.
- Navigation landmark regions without accessible names. #3509700: Accessibility of landmark regions in toolbar When a page has multiple landmark regions of the same kind, they should be distinguishable by name.
- Toolbar has some navigation landmarks with accessible names. For example, in the second-level toolbar "trays" with menus: manage, shortcuts, and user.
- However is also has unlabelled navigation landmarks too. For example there the home, "back to site", tour, and edit items.
- Empty navigation regions. #3509700: Accessibility of landmark regions in toolbar Some navigation landmark regions are present, but are empty. This is pointless, and may be confusing because they appear in a screen reader's list of landmarks. They are associated with top-level toolbar items which don't have a second-level tray.
Comments
Comment #2
andrewmacpherson commentedStarting a meta-issue to improve toolbar accessibility. Some of these can be fixed separately but it's good to have a parent issue for them. Hopefully that will help to avoid conflating issues.
There are a few related issues already, so I'll gather those up.
Comment #3
andrewmacpherson commentedComment #4
andrewmacpherson commentedComment #5
andrewmacpherson commentedAdding the failure of WCAG Focus Order. Historically, I think the DOM order was chosen to prioritize some actions for blind users with a screen reader. The rationale was that users are more likely to want the edit button that the user profile links. However it makes a confusing tabbing order visually.
I'm not convinced that it's more important to reach the edit button before the logout button. The weird visual tabbing order is more important to fix IMO. However we could consider putting the user account menu on the right hand side; that's a common design pattern nowadays, and it would mean we can make the visual order match the current DOM order.
Comment #6
andrewmacpherson commentedTwo interesting issues.
#3066954: Admin toolbar not usable with latest versions of JAWS due to mis-use of aria-owns - top-level buttons with a menu tray have crappy ARIA states and don't work with spacebar. The
aria-pressed="false"state never changes!#3046089: Accessibility of Main toolbar items and internal editing - a mixture of issues, which need a few spin-offs.
Comment #7
andrewmacpherson commentedRelated: the problem with toolbar buttons never changing
aria-pressed="false"has also been noticed at #3012027: Decouple tour triggering from the toolbar.Comment #8
andrewmacpherson commentedComment #9
andrewmacpherson commentedComment #10
andrewmacpherson commentedComment #11
andrewmacpherson commentedComment #12
andrewmacpherson commentedComment #13
andrewmacpherson commentedThe back-to-site behaves OK. It's just a link, without any ARIA role or properties.
Comment #14
andrewmacpherson commentedComment #15
andrewmacpherson commentedComment #16
andrewmacpherson commentedComment #18
andrewmacpherson commentedComment #19
andrewmacpherson commentedComment #20
andrewmacpherson commentedComment #21
andrewmacpherson commentedFiled some new child issues. Rearranging the known issues in the summary here.
Comment #22
andrewmacpherson commentedComment #24
bnjmnmComment #28
mherchelCreated and linked child issue #3269420: Toolbar icons may not meet contrast when in forced colors mode
Comment #32
mgiffordAdding reference to Windows High Contrast Mode.
Comment #33
kentr commentedThese don't have their own issues yet, correct?
#3 is a quick fix.
From looking at the template, removing the nested navs as suggested for #1 might also fix #2.
It's also throwing this Axe error, which resolves when I change the
divtonavand remove therole="group".Comment #34
mgifford@kentr definitely useful to set up sub issues to see that there is some progress on this issue that Andrew set up initially in 2019.
Comment #35
kentr commentedAdded child issue #3509700: Accessibility of landmark regions in toolbar.
Comment #37
quietone commentedThe Toolbar Module was approved for removal in #3476882: [Policy] Move Toolbar module to contrib.
This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.
The deprecation work is in #3484850: [meta] Tasks to deprecate Toolbar module and the removal work in #3488828: [meta] Tasks to remove Toolbar module.
Toolbar will be moved to a contributed project before Drupal 12.0.0 is released.