WCAG 2.2: Increase header menu button min-height to 24px #4357
Labels
accessibility concern
Any bug, feature request or question about the accessibility of a portion of a product
accessibility
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
header
WCAG 2.2
All items related to WCAG 2.2 update activities
Milestone
Description of the issue
As part of my testing and calculations for the WCAG 2.2 'Target size (minimum)' criterion (restricted document), I tested the GOV.UK Design System header element.
I found that the 'Menu' button doesn't have a set height. Since the font is set to 16px, the menu button's height is 16px. That's pretty short, especially compared to the 40px height of our other buttons.
Steps to reproduce the issue
The header menu button can be viewed on this design system website code example, at a screen width between 320px and 768px: https://design-system.service.gov.uk/components/header/with-service-name-and-navigation/index.html
This screenshot shows the header component from that example link, at a screen width of 320px. I've moved focus to the 'Menu' element to visually highlight how little height there is for the menu's target area.
Actual vs expected behaviour
Actual behaviour: the menu button has a clickable target height of 16px.
Expected behaviour: WCAG 2.2 AA target size (minimum) recommends hit targets to be minimum 24px by 24px.
There's an exception for elements which are spaced out enough though:
So this is not a WCAG failure, but nonetheless, the menu button could do with an increase to its hit-target height.
Recommendation
Add a minimum height of 24px to the 'Menu' button.
Here's how it would look:
Benefits of this change
Environment (where applicable)
This is the environment in which I tested and found this issue:
The text was updated successfully, but these errors were encountered: