Skip to content
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

A11y | Main navigation (Part 2) #59

Draft
wants to merge 4 commits into
base: 5.3.x
Choose a base branch
from
Draft

Conversation

zoglo
Copy link
Member

@zoglo zoglo commented Oct 27, 2024

Followup of #53

Description

  • Improve the accessibility-navigation JavaScript 832b2f3

    • close on lost focus (either new focus via hover / active element on focus-tab)
    • handle the aria states for each item and close them accordingly
    • handle the proper events
    • Remove the previously added aria-role: none from list elements
    • main navigation | accessibility Improvements  #58 - Sub-navigation should close on ESC or when leaving the sub-navigation -> Close and handle all previously open dropdowns when pressing ESC
  • Handle infinite navigation levels within the main-navigation ddfc2c2

    • This one adds the same handling for navigations past level_2 in case people would activate them. This has been added to properly implement the accessibility-navigation JavaScript due to the need of handling multiple levels.
  • Implements high contrast mode for the navigation

  • Consider focus for all buttons on MacOS 011f21c

    • This one actually does not make sense if we want to be accessible since it's a pure design normalizer that would just remove it completely...

Context

Please mind that using :hover for any navigation dropdown that can not be closed by a mechanism is not accessible based on:
https://www.w3.org/WAI/WCAG21/Understanding/content-on-hover-or-focus

Dismissible
A mechanism is available to dismiss the additional content without moving pointer hover or keyboard focus, unless the additional content communicates an input error or does not obscure or replace other content;

Aka - Dismissable via ESC https://bitvtest.de/pruefschritt/bitv-20-web/bitv-20-web-9-1-4-13-eingeblendete-inhalte-bedienbar

* consider high contrast colors
* handle infinite navigation level handling
* add a storage to save open dropdowns
* close on ESC
* close on lost focus (either new focus via hover / active element on focus-tab)
* handle the aria states for each item and close them accordingly
* handle the proper events
@zoglo zoglo marked this pull request as draft November 5, 2024 15:40
@zoglo
Copy link
Member Author

zoglo commented Nov 5, 2024

I'd rather add the focus trap on mobile in this PR than the next :)

@sascha-mueller
Copy link
Collaborator

Many thanks for your efforts and all the work you have put into it. It looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants