The hidden="until-found" HTML attribute lets you hide content while keeping it discoverable via the browser's Find in Page (Ctrl+F / Cmd+F) and fragment navigation.
When a user searches for text inside a hidden="until-found" element:
beforematch event on the hidden elementhidden attribute is removed<div hidden="until-found">
<p>This content is hidden but searchable via Ctrl+F.</p>
</div>
This is perfect for accordion/collapsible sections — content stays collapsed until the user searches for it, then it automatically expands.
hidden| Attribute | Rendered | Searchable (Ctrl+F) |
|---|---|---|
hidden | No | No |
hidden="until-found" | No | Yes |