QMenus Are Not Compatible with QLists and QItems by Default #17162
Labels
area/a11y
Accessibility
area/components
bug/1-repro-available
A reproduction is available and needs to be confirmed.
flavour/quasar-cli-vite
kind/bug 🐞
Qv2 🔝
Quasar v2 issues
What happened?
The documentation for
QMenu
currently states:Using axe DevTools to test a Basic
QMenu
as shown in the documentation reveals that elements withrole=list
(QList
) as child elements of elements withrole=menu
(QMenu
) violates WCAG Success Criteria 1.3.1: Info and Relationships.Removing the
QList
component fromQMenu
then reveals another violation of WCAG Success Criteria 1.3.1: Info and Relationships.A workaround in the meantime is to add
role="menuitem
attributes to each of theQItem
elements contained within theQMenu
. The fact that these attributes have to be added individually to eachQItem
element in order to avoid a WCAG Success Criteria violation indicates a failure within the design ofQMenu
that needs to be redressed by maintainers.What did you expect to happen?
Usages of
QItem
withinQMenu
should haverole="menuitem"
attributes automatically applied by default to avoid WCAG Success Criteria violations.Reproduction URL
https://codepen.io/quadbaup/pen/KKYExVq
How to reproduce?
QMenu
with aQList
: https://codepen.io/quadbaup/pen/KKYExVqQMenu
Element has children which are not allowed: [role=list]
QMenu
with noQList
and repeat steps 2 through 5: https://codepen.io/quadbaup/pen/vYMqbjNRequired ARIA parent role not present: list
QMenu
where eachQItem
has arole="menuitem"
attribute and repeat steps 2 through 5: https://codepen.io/quadbaup/pen/mdgZvvrFlavour
Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)
Areas
Components (quasar)
Platforms/Browsers
Chrome
Quasar info output
No response
Relevant log output
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: