-
-
Notifications
You must be signed in to change notification settings - Fork 637
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
summary should be interactive #656
Comments
@sh0ji you're totally right, https://w3c.github.io/html-aria/#el-summary |
This was closed erroneously. This issue is still present. |
I know this is bad open-source etiquette. We're also experiencing this problem currently. Does anyone have any pointers about what we'd need to do in order to fix? I'd be happy putting together a PR |
@stuartjnelson hello! Yes, a PR would be very helpful. I start my holiday PTO in a few days and I'll have time to focus on this project next week, so your timing is perfect. |
I believe the
summary
element should be considered an interactive element and that there shouldn't be any errors thrown when aclick
listener is attached to it:The spec does list
details
element as interactive, but this is misleading since its activation behavior is triggered by its childsummary
OR a UA-provided affordance (all browsers add a shadowsummary
to accomplish this affordance). The spec forsummary
does also describe thesummary
activation behavior, making it more clear that thesummary
is the element that activates thedetails
open state.This all also makes logical sense since the
details
can contain interactive content, meaning it cannot itself be interactive:Further, both browsers and screen readers treat the
summary
like abutton
element (some screen readers actually call it an expandable button), including the same keyboard interaction model as abutton
: it is focusable withouttabindex
and Enter triggersclick
repeatedly when held (i.e., onkeydown
); Space triggersclick
onkeyup
only. I made a simple CodePen to demo/test this: https://codepen.io/sh0ji/pen/OJPppER.Note that this also means that #582 is not a false positive.
The text was updated successfully, but these errors were encountered: