-
Notifications
You must be signed in to change notification settings - Fork 334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Header should support a single link without collapsing to a menu on mobile #1635
Comments
Some notes from team discussion on this:
|
Hi there, as a UI Developer doing some accessibility work with HMRC / VOA - we were advised by DAC that the menu would fail accessibility (level 'A' compliancy) as the link lacks context. Here is the full feedback from DAC:
Context would involve adding descriptive words to the before / after menu, however since we are only using the single sign out item in the menu, we have introduced a temporary fix to hide the menu and always show the sign out link: .js-enabled .govuk-header__menu-button { |
Thanks for raising this @danlaceyhmrc. It seems that the code you've included is from GOV.UK template. GOV.UK Template is deprecated, and will only receive major bug fixes and security patches so there won't be a fix issued for this. We would recommend migrating from GOV.UK Template to the Design System. We have published some guidance for this, including steps for migrating over gradually rather than in one go. |
A 👍 from us. We've got a single link in the header (though have other nav below) and so the menu is an unnecessary extra click. We'll be disabling manually in the short term. |
Another user raised this on support 08/01/2024 after receiving this as usability feedback from the Digital Accessibility Centre (DAC). Here is a copy of the feedback:
|
This issue has a bit of overlap with the current work on navigation. The work on navigation is still in early stages, so it's probably worth fixing this while we consider navigation more thoroughly. However if this seems do build into a larger piece of work, we should probably make this part of the work for navigation. |
Another thought, around breaking changes: to avoid this being a breaking change, should we introduce this as specific option for the Header component (as well as something people can set when using the template directly?) rather than have the Header automaticly not render a menu when there's only one navigation item (which may cause unexpected changes for services which currently have only one item in their menu)? |
And finally, this may require:
|
Good questions! Making it an option makes sense to me. I'd been assuming that we would just hide the menu button and permanently show the menu that is normally toggled by it. Effectively it'd make the header fall back to the no-JS experience? So the design should already be fine, although it's probably not ideal any further improvements would likely come from the navigation epic. Maybe this is a js (and corresponding Nunjucks) config that just disables the changes the JS makes, and some corresponding guidance that says something like 'If you only have 1 link in your menu you can disable collapsing on mobile by…'? |
What
The header component should allow for a single navigation link that does not collapse in to a menu on mobile.
Why
This would help support, for example, “sign out” links. At the moment this is not a usable option and the single link collapses into a menu link when it doesn’t have to.
Who needs to know about this
Done when
The text was updated successfully, but these errors were encountered: