-
Notifications
You must be signed in to change notification settings - Fork 467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature]: getByRole
Support of summary
Elements
#1252
Comments
getByRole
Support of summary
ElementsgetByRole
Support of summary
Elements
getByRole
Support of summary
ElementsgetByRole
Support of summary
Elements
R.E.
See w3c/html-aam#345 (comment). Feels like there is some traction in this space. |
Oh wow. That's a really helpful link. Yeah it looks like it wouldn't be so easy to move forward with something like this then. I guess in the meantime we'd need to stick to |
Hi @ITenthusiasm! Thanks for taking the time to open this issue. |
@MatanBobi Makes sense! Thanks for reviewing the issue and providing that background! 🙏🏾 It makes sense to stay close to the spec and avoid extra dependencies. I'll reach out to them soon. |
@MatanBobi Created A11yance/aria-query#546. Leaving a note here as a reference. @cmorten's link is also worth keeping track of. |
I've a similar issue, but for me it starts with querying for the |
@weilbith |
Thank you very much for the quick answer! |
Desired Feature
The
<summary>
-- together with the<details>
element -- plays an incredibly important role in supporting "Accordion Components" natively -- and without the need for JS! They are exposed to the accessibility tree and discoverable for Screen Readers (tested with Voice Over in FireFox/Safari/Chrome on MacOS). However, this important element is not currently discoverable for developers using the recommendedgetByRole
query.If possible, it would be great if
getByRole
could support<summary>
.Suggested Implementation:
According to MDN, the implicit ARIA role is
button
. So a simple solution could be to allowsummary
elements to be discoverable bygetByRole("button")
. However, one thing to keep in mind is that according to the spec:When I tested with VoiceOver, the
summary
element seemed to be identified as a unique kind of button that was related to thegroup
created by thedetails
element. Based on other people's previous experiences, other Screen Readers seem to do something similar. So the hope is that this would be a reasonable change.Alternatives
Another alternative is to do nothing and hope that the spec comes up with a true implicit role that isn't dictated by User Agents like popular Screen Readers. However, it's not clear how long that would take (or if that would ever happen).
Teachability, Documentation, Adoption, Migration Strategy:
The documentation probably would not need an update. More than likely, the Changelog could just mention that
summary
elements are newly discoverable by usinggetByRole
.The text was updated successfully, but these errors were encountered: