material-components / material-web

Material Design Web Components
https://material-web.dev
Apache License 2.0
9.2k stars 878 forks source link

[a11y][mwc-top-app-bar] role toolbar attribute misaligned with element section #2319

Closed gullerya closed 12 months ago

gullerya commented 3 years ago

According to Deque Axe - accessibility automation tool role toolbar SHOULD NOT be used on element section.

Yet, this is the current usage in the mwc-top-app-bar component (which seemingly goes back to the Material Design approach).

According to this W3 document role toolbar MAY be used on div element, for example.

Please consider replacing (or rearranging) the DOM structure to allow passing the a11y tests of axe, which is quite a standard in the industry.

Note: same applies to the mwc-top-app-bar-fixed component.

dfreedm commented 3 years ago

Thanks for the feedback. This construction with <section role="tooltip"> is directly from the MDC top app bar, as you noticed, so I'll have to double check what a more appropriate element would be there.