details/summary Native Disclosure
Reports whether details body content is exposed by the open attribute and which direct summary element is the native summary (the first one). Structural placement is reported separately from disclosure state.
Description
The details element provides native disclosure behavior, with its first summary child serving as the summary.
The details element provides native disclosure behavior, with its first summary child serving as the summary. The open attribute controls whether the body is exposed.1
The tool returns bodyExposed, summaryIndex, summaryFirst, usesDefaultSummary. The fields describe the supplied local pattern or effective state, or contain the formatted markup shown below.
When to use details/summary Native Disclosure
Use this for the following task: Reports whether details body content is exposed by the open attribute and which direct summary element is the native summary (the first one). Structural placement is reported separately from disclosure state. Provide the requested local fields extracted from the relevant element or attribute.
How to use details/summary Native Disclosure and understand its results
- Prepare the parsed element names, attribute values or direct element-child lists requested below. Keep attribute presence separate from its value.
- Enter open, children according to the field table, then run the tool.
- Read bodyExposed, summaryIndex, summaryFirst, usesDefaultSummary. Check the effective state, recognized-token flags or generated markup against the rules below.
- Correct any reported local mismatch and check the resulting markup in its intended document and browser context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| open | Open | boolean | Required |
| children | Children | list of string; minimum entries 0; maximum entries 10000; each entry: maximum text length 10000 | Required |
Supply the parsed Boolean open state and direct element-child names. Fold names’ ASCII case and report the first summary index, whether it is first overall and whether a default summary is needed.
bodyExposed=open; summaryIndex=first summary child; default summary when absent The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| bodyExposed | Body Exposed | boolean |
| summaryIndex | Summary Index | integer |
| summaryFirst | Summary First | boolean |
| usesDefaultSummary | Uses Default Summary | boolean |
{
"input": {
"open": true,
"children": [
"summary",
"p"
]
},
"output": {
"bodyExposed": true,
"summaryIndex": 0,
"summaryFirst": true,
"usesDefaultSummary": false
}
} Limitations and assumptions
A present open="false" still represents an open Boolean attribute; convert presence correctly before calling. This does not simulate interaction, render a fallback label or validate all child content.
The tool does not fetch a page, run a browser or validate an entire HTML document. Malformed tool requests produce input errors; valid requests can still report unrecognized values or failed local checks.
Alternative or Complementary methods
Choose Boolean Attributes List Lookup when you need its operation: Looks up current standard HTML boolean attribute names, independent of their element applicability. Enumerated hidden, draggable and contenteditable are excluded. Choose figure/figcaption Pairing Check for the complementary operation: Checks figure direct-element children for at most one figcaption at either end. Missing figcaption is allowed; caption content quality and accessibility are outside this structural check.
Background reference: HTML Standard: details/summary Native Disclosure.
References
Similar or alternative tools
- Boolean Attributes List Lookup
Looks up current standard HTML boolean attribute names, independent of their element applicability. Enumerated hidden, draggable and contenteditable are excluded.
- figure/figcaption Pairing Check
Checks figure direct-element children for at most one figcaption at either end. Missing figcaption is allowed; caption content quality and accessibility are outside this structural check.