[Bug][a11y]: Accordion item should not have role="listitem"
Closed this issue · 0 comments
majornista commented
Description
Browsers expose elements using .spectrum-Accordion-item
as having role="listitem" even when the element is not contained within a list.
Steps to reproduce
This is due to the css declaration at:
Examples on https://opensource.adobe.com/spectrum-css/accordion.html#standard add role="presentation"
to the div.spectrum-Accordion-item
in order to work around the issue, but other libraries using Spectrum-CSS may fail to do so.
Expected behavior
.spectrum-Accordion-item
should not require display: list-item
and should be exposed by the browser to assistive technology as a listitem
.
Screenshots
Environment
-
Spectrum CSS version: @spectrum-css/accordion@3.0.43
-
Browser(s) and OS(s):
Additional context
Identified as part of Spectrum Web Components Accessibility Audit: adobe/spectrum-web-components#3212