The <selectedcontent> Element
Technical Summary
selectedcontent is an HTML element placed inside the first child button of a select. It displays cloned child nodes from the currently selected option. Its authoring content model is empty; the browser replaces its contents as selection state changes.
The copied nodes are the option's children, not its label attribute or value. The update algorithm returns early when the select has the multiple attribute.
Definition / Categories
| Item | Specification summary | Check |
|---|---|---|
| Meaning | Shows the currently selected option's contents in the select's first-child button | Keep choices, selection state, and display location distinct |
| Categories | None | It is not flow, phrasing, or interactive content |
| Context | Inside the first-child button of a select | The button is the special first-child branch for drop-down selects |
| Content model | Empty in author markup; the browser clones the selected option's child nodes | Do not hand-write a second copy inside selectedcontent |
| DOM interface | HTMLSelectedContentElement | An element interface exists, but it adds no dedicated role or display-value IDL attribute |
Usage context
In a customizable select, the select retains the selection model and form value, while its first-child button provides the closed-state display. selectedcontent is the place inside that button where the selected option's contents appear. The button and selectedcontent are not independent page-level controls.
<label for="plan">Plan</label>
<select id="plan" name="plan">
<button>
<selectedcontent></selectedcontent>
</button>
<div>
<option value="basic"><span>Basic</span></option>
<option value="pro" selected>
<span>Pro</span> <small>Recommended</small>
</option>
</div>
</select>
appearance: base-select is a styling feature in CSS Basic User Interface Module Level 4. Evaluate the HTML content model separately from CSS support, and measure rendering, picker, and interaction in each implemented browser and version.
Copying and updates
The HTML Standard's update steps return immediately when the select has the multiple attribute. Otherwise, each non-disabled descendant selectedcontent uses the first option in the option list whose selectedness is true. If there is no such option, its contents are cleared. Otherwise, the option's child nodes are deep-cloned and replace the current contents.
| Trigger | Specification behavior | Measurement note |
|---|---|---|
| Initial markup connection | After connection in an eligible select, update from the current selection | Do not conflate parser intermediate states with the connected result |
| Selection change | Select update notifications update descendant selectedcontent elements | Record user actions separately from selection changes made through DOM APIs |
| Child mutation in selected option | Each selection update clones the option's child nodes | Do not infer immediate synchronization from the selection algorithm alone |
| Moving selectedcontent | Recalculate connection conditions and queue an update microtask when eligible | Measure movement, insertion, and removal conditions separately |
multiple select | The descendant update algorithm returns early | Distinguish valid customizable-select markup from boundary fixtures in WPT |
Boundary with label and value
selectedcontent does not run the option label algorithm or copy the form value. Its copy algorithm reads the selected option's child nodes.
| Information | Defined by | Relationship to selectedcontent |
|---|---|---|
| Choice label | The option's label attribute or option text | The label attribute's string is not copied into selectedcontent |
| Display markup | The option's child nodes | Child nodes are cloned for the current selection |
| Form value | The option's value attribute or option value rules | It is not copied; the select handles form submission |
| Source option | The option list inside select | Nodes are cloned, not moved, so the choice remains in the list |
See the option page for rich option content, label/value resolution, and the text-only content model for options in datalist.
DOM Interface / disabledness
The DOM interface is HTMLSelectedContentElement and defines a constructor. The element has no dedicated content attribute or form-submission API. The specification has an internal boolean disabled state that controls whether an element participates in updates; it is set in conditions such as being inside an option or another selectedcontent element. Do not confuse this internal state with an author-facing disabled attribute or IDL property.
const selectedcontent = document.querySelector('selectedcontent');
const select = selectedcontent.closest('select');
const selectedOption = select.selectedOptions[0];
selectedcontent instanceof HTMLSelectedContentElement;
selectedcontent.innerHTML;
select.value;
selectedcontent.innerHTML reads the display nodes created by the browser. Read select.value for the application or form value; do not use display markup as that value.
Fact / Evidence
Normative claims and implementation observations are recorded separately. WPT runs without a known source revision remain partial, and browser accessibility-tree output is not generalized to platform APIs or assistive-technology speech.
| Type | Fact / claim | Conditions / scope | Status | Source |
|---|---|---|---|---|
| SPEC | selectedcontent displays the currently selected option's contents in the select's first-child button. | Customizable drop-down select content model. | Reviewed | HTML Standard: selectedcontent element |
| SPEC | On update, the algorithm deep-clones the selected option's child nodes and replaces the selectedcontent contents. | A non-disabled selectedcontent with a selected option. | Reviewed | HTML Standard: update and clone algorithms |
| SPEC | The option's label attribute is not copied, and the descendant update algorithm returns for a multiple select. | Selected-content update algorithm; option label/value resolution is separate. | Reviewed | HTML Standard: selectedcontent updates |
Evidence
- HTML Standard: The selectedcontent element — definition, interface, disabledness, copying, insertion, connection, movement, and update rules
- HTML Standard: The select element — customizable-select content model, option list, selection, picker, and form relationships
- HTML Standard: The option element — option content model, label, value, and selectedness
- HTML Accessibility API Mappings — platform mappings for HTML elements and attributes; it has no dedicated selectedcontent entry
- Web Platform Tests: customizable select — selectedcontent selection, mutation, nesting, insertion, and removal cases
Implementation Evidence
Implementation evidence records the environment, test files, results, and unrun scope. The Japanese and English evidence tables are generated from docs/atlas/evidence-registry.json.
| Type | Verification scope | Conditions to record | Status |
|---|---|---|---|
| IMPL | HTMLSelectedContentElement interface, selected option child copying, clone separation, updates, and the label boundary |
2026-10-21 / Chrome UA 155.0.0.0 / Windows NT 10.0 (Win32) / Japanese locale / viewport 1280×720 / DPR 1.25. The local fixture at build-config/yugien/research-results/selectedcontent-v1/ reported 10/10 checks passed. Confirmed the interface, child copying, no immediate rewrite after editing the source option, update after selection change, and the separate label attribute and form value. CSS.supports("appearance", "base-select") returned true. Recorded at 2026-10-20T15:40:42.127Z.Post-generation check: docs/atlas/selectedcontent-evidence-2026-10-21.md All Japanese and English Yugien and Atlas pages loaded over local HTTP with the expected lang and h1; each Atlas page displayed three evidence rows. |
Partial observation (Chrome 155 / 1 environment) |
| WPT | Four selectedcontent update, nesting, insertion, and removal WPT files / 24 subtests | 2026-10-21 / Chrome UA 155.0.0.0 / Windows NT 10.0 (Win32) / wpt.live. selectedcontent.html: 4 passed, 2 failed, 1 timed out, 4 not run. selectedcontent-mutations.html: 6 passed, 2 failed. selectedcontent-nested.html: 1/1 passed. selectedcontent-insertion-removal.html: 4/4 passed. Total: 15 passed, 4 failed, 1 timed out, 4 not run. Failures involved updates after form reset / selected reassignment and parser mutation tests 6 and 8. The first promise test timed out after its interaction prompt. wpt.live did not expose the served test commit, so the revision is unknown. Details: docs/atlas/selectedcontent-evidence-2026-10-21.mdThe test version used was not recorded. The linked test may change, so this result cannot be repeated with certainty against the same version. |
Partial run (4 files / revision unknown) |
| AAM | HTML-AAM entry status, and the select button value, picker items, and separate selectedcontent node in the Chrome accessibility tree | 2026-10-21 / Chrome UA 155.0.0.0 / Windows NT 10.0 (Win32). The HTML-AAM Editor’s Draft has no dedicated selectedcontent entry. The closed control was exposed as a collapsed pop-up button whose value included the selected option text. With the picker open, the tree showed an expanded pop-up button, the selected item, and the other option; it did not show a separate selectedcontent node. Windows UI Automation and screen-reader speech were not measured. docs/atlas/selectedcontent-evidence-2026-10-21.md |
Partial observation (Chrome accessibility tree) |
Specification review and browser, WPT, and accessibility-tree observations are treated as separate evidence.
Coverage / Open Issues
- ReviewedMeaning, context, DOM interface, option child-node copying, label/value boundary, and multiple-select update boundary
- OpenBehavior across browsers and operating systems, complex option markup, all DOM mutation and movement conditions, and CSS appearance / picker rendering
- OpenPlatform accessibility APIs when HTML-AAM has no dedicated mapping, screen-reader speech and interaction, and the full WPT scope
This page records initial coverage. Its results apply only to the named environments and selected tests; they do not claim complete verification of selectedcontent or every implementation.
Related surface
For a beginner-friendly explanation, see Yugien on selectedcontent. The full selection model and customizable select are covered by select; option markup and label/value behavior by option; and the first-child button's form behavior by button.