Skip to content

Add selectedcontent element and allowances for 'button' part of select - #528

Merged
patrickhlauke merged 14 commits into
w3c:gh-pagesfrom
josepharhar:selectedoption
Jul 23, 2025
Merged

Add selectedcontent element and allowances for 'button' part of select#528
patrickhlauke merged 14 commits into
w3c:gh-pagesfrom
josepharhar:selectedoption

Conversation

@josepharhar

@josepharhar josepharhar commented Sep 27, 2024

Copy link
Copy Markdown
Contributor

The <selectedoption> element is part of the customizable select feature and is being added to HTML here.

It is already implemented in chromium and will be shipped when customizable <select> is shipped.

test case


Preview | Diff

Comment thread index.html Outdated
Comment thread index.html Outdated
@scottaohara

Copy link
Copy Markdown
Member

Noting here that there will need to be an entry for a button as a child of a select as well.

@josepharhar

Copy link
Copy Markdown
Contributor Author

Noting here that there will need to be an entry for a button as a child of a select as well.

Where should I put this?

@josepharhar josepharhar changed the title Add <selectedoption> element Nov 12, 2024
@scottaohara

Copy link
Copy Markdown
Member

Noting here that there will need to be an entry for a button as a child of a select as well.

Where should I put this?

oh no worries @josepharhar that was a note for me, not so much for you.

if you did want to take it on, we'd need a new button as a child of a select entry in the table - using a similar ID like I'm setting up over in html aam el-button-select-child

but really, don't worry about it. i was planning on working on finishing this PR once the HTML/HTML AAM PRs were a bit closer to done.

@scottaohara

Copy link
Copy Markdown
Member

latest commit updates selectedcontent to align with recent HTML AAM changes.

also added in the button as a child of select variant / expectations.

@scottaohara scottaohara changed the title Add <selectedcontent> element Mar 26, 2025
Comment thread index.html Outdated
Comment thread index.html Outdated
account for misuse of element - where the element will just be a generic element and thus is name prohibited, but any role/attributes can be used to modify/fix the errant element, as needed.
@scottaohara

Copy link
Copy Markdown
Member

test case file created and added to OP - https://w3c.github.io/html-aria/tests/selectedcontent.html

fixed to match other role markup:
`<code>role=<a href="#index-aria-generic">generic</a></code>`
Comment thread index.html

@patrickhlauke patrickhlauke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me (though note one question #528 (comment))

@patrickhlauke

Copy link
Copy Markdown
Member

discussed with @scottaohara separately. we're ok with the current wording, as the specifics of what a "valid descendant of a select" is are defined already in HTML, so we can keep it snappy. merging.

@patrickhlauke
patrickhlauke merged commit 5aa1657 into w3c:gh-pages Jul 23, 2025
2 checks passed
ext added a commit to html-validate/html-validate that referenced this pull request Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants