vanilla-framework icon indicating copy to clipboard operation
vanilla-framework copied to clipboard

Navigation dropdowns do not report expanded/collapsed state

Open jmuzina opened this issue 1 year ago • 2 comments

Describe the bug

Navigation dropdowns do not report expanded/collapsed state.

To Reproduce

Steps to reproduce the behavior:

  1. Go to https://vanillaframework.io/docs/examples/patterns/navigation/dropdown-dark?theme=light
  2. Observe that the nested p-navigation__item--dropdown-toggle elements do not have aria-expanded attribution on them.
  3. Install a screen reader
  4. Access the above navigation bar using keyboard controls, and tab over the navigation dropdowns.
  5. Verify that the screen reader does not report expanded/collapsed state.

Expected behavior

The navigation dropdown links report expanded/collapsed state to screen readers. Tabbing over them should report "button collapsed" or something similar. Expanding/collapsing them should also report the change to the screen reader.

See https://getbootstrap.com/docs/4.0/components/navbar/ for example.

Desktop (please complete the following information):

  • OS: PopOS 22.04
  • Browser Chrome
  • Version 125.0.6422.141 x64

Additional context

This was noticed during work on reduced top-nav, but effects all vanilla navigation.

jmuzina avatar Jul 01 '24 16:07 jmuzina

Triage: this has quite high impact on accessibility, but may be quite high effort as well (and rely on JS that will not be easily updated downstream).

To be discussed with team if we want to address it in current codebase.

bartaz avatar Sep 25 '24 08:09 bartaz

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-15289.

This message was autogenerated