Navigation dropdowns do not report expanded/collapsed state
Describe the bug
Navigation dropdowns do not report expanded/collapsed state.
To Reproduce
Steps to reproduce the behavior:
- Go to https://vanillaframework.io/docs/examples/patterns/navigation/dropdown-dark?theme=light
- Observe that the nested
p-navigation__item--dropdown-toggleelements do not havearia-expandedattribution on them. - Install a screen reader
- Access the above navigation bar using keyboard controls, and tab over the navigation dropdowns.
- 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.
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.
Thank you for reporting us your feedback!
The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-15289.
This message was autogenerated