-
Notifications
You must be signed in to change notification settings - Fork 125
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
Update: legend to provide name to optgroup #2360
base: main
Are you sure you want to change the base?
Conversation
In regards to the updated content model for the select element and its allowed children, an `optgroup` can have a `legend` element as its first child, and this `legend` needs to be able to name the `optgroup` similarly to how a `legend` names a `fieldset`. see: whatwg/html#10586
✅ Deploy Preview for wai-aria ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
open question in whatwg/html#10586 (comment) about what should take priority - legend or optgroup's label attr. if both end up being allowed / render - then one of these could be added to the accDescription computation - instead of ignoring one or combining them into one long name.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple of minor formatting comments, but this LGTM from a spec position, modulo new resolutions from the WHATWG.
Co-authored-by: Keith Cirkel <[email protected]>
@keithamus would you mind taking another look? I've updated the ordering for the optgroup naming, and added new content to how a description should be calculated. cc @josepharhar as updates here related to my comments in the update content model for customized select PR |
examples for tests for how name/desc steps should work
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still LGTM
put back into the draft state as I need to revise the bits about how a |
If you have a recommendation for what to do in this case, let me know and/or comment on the crbug. I haven't implemented anything yet to account for the case where both are present. |
@josepharhar i think it's totally fine to only have one render / and have a preference for the legend element in this case since it'll allow for authors to do more.
|
In regards to the updated content model for the select element and its allowed children, an
optgroup
can have alegend
element as its first child, and thislegend
needs to be able to name theoptgroup
similarly to how alegend
names afieldset
.see:
whatwg/html#10586
Test, Documentation and Implementation tracking
Once this PR has been reviewed and has consensus from the working group, tests should be written and issues should be opened on browsers. Add N/A and check when not applicable.