localgovdrupal / localgov_base

The base theme for LocalGov Drupal websites.
8 stars 14 forks source link

Services menu button: focus order and announcements #578

Closed msayoung closed 2 weeks ago

msayoung commented 1 month ago

Initial issue reported by @waako

Using a keyboard to navigate tab through the header and press enter to expand the Services menu. Tab through the menu items. Note that you skip the other header items. Problem: a non-sighted keyboard user may miss these header items. The expected behaviour would be that you leave the menu items and return to the other header items.

Issue 2. : Auto closing of the Services button Tested on NVDA screenreader / Firefox

Problem: The button automatically collapsing does not align with the state announced by the screenreader. Recommendation: I don't think we need to automatically close the button when you return to it. The user can decide whether to close it.

Issue 3: Aria label I think the aria-label is too verbose. We could shorten it to "Services: jump to services" and leave the expand / collapse announcement to the aria-expanded.


Note: to discuss and create another issue if needed. I know why the services menu works like it does, but I'd be interested in exploring a redesign from scratch so that we can use a natural focus order and not need to "jump" to the menu. I would imagine we'd need to offer an alternative header option, so that we don't break the existing sites.

markconroy commented 1 month ago

Thanks for the report of this issue. It's a nice juicy one to get working on.

Sorry, but that's all the input I have for now on this :smile:

Maybe next week or the week after I could try set aside a full day to figure the 3 issues out. And after that, we can think of a way to do the "new header" which I'd love to do. And I think that would give us less headache if we try to use localgov_base as the base theme for other projects, such as NHS.

msayoung commented 3 weeks ago

This looks amazing @markconroy !