The hidden=until-found attribute has been available for some time — Chrome shipped it in version 102 back in 2022, and it appeared in the Firefox 139 release notes. Safari has since landed support in Safari Technology Preview 125. The attribute lets content hidden in HTML still be surfaced by the browser's in-page search.
What the attribute does
Adding hidden=until-found to an element keeps that element's content hidden, yet allows a find-in-page search to locate the content inside it.
<div hidden="until-found">
<!-- hidden content -->
</div>
When a search matches hidden content, the element is revealed and the matching text is highlighted:


Under the hood, the browser implements this by implicitly setting content-visibility: hidden on the element in the user agent styles.
Relationship to <details>
The most commonly cited use case for hidden=until-found is building a faux-accordion, where panels open and close on click. But that pattern already has a native answer in <details>, which browsers also give content-visibility: hidden on the ::details-content pseudo-element that wraps the content.

The <details> element wasn't as widely supported in 2022. It is now part of Interop 2025, and one of the listed capabilities is in-page search of collapsed content. Chrome already supports this, Firefox recently shipped it (apparently alongside its hidden=until-found support), and Safari is expected to follow through Interop 2025. The Chrome for Developers example that demonstrates a workaround for limited <details> support can now be replaced by the native behavior.
Whether there's a similarly compelling case for hidden=until-found beyond that remains unclear. Hiding content accessibly while keeping it searchable seems useful, but the popover attribute takes a different route: it uses display: none, which removes the content from in-page search entirely.

Polyfill limits
Because Safari support has not yet fully shipped, a consistent cross-browser experience would require toggling between content-visibility: hidden to hide content and content-visibility: auto to reveal it. As Nathan Knowler explains in his write-up on polyfilling the attribute, that approach breaks: setting content-visibility: hidden also removes the content from in-page search, whereas hidden=until-found preserves searchability. The feature therefore cannot be polyfilled with content-visibility alone.
Knowler's solution uses the Shadow DOM to detect the HTML attribute, check browser support, and revert properties as needed — hiding content visually without making it unfindable.
Styling and future work
In-page search highlights matching content, which is one styling hook. A ::search-text pseudo-element in the CSS Pseudo-Elements Module Level 4 (Editor's Draft) is intended to select matched text and style the highlight color.


Multiple matches already receive different treatment: the current selection is highlighted differently from the rest.
Per the spec, ::search-text should be combinable with the :current pseudo-class to target the active match as ::search-text:current. Combining it with the :past and :future pseudo-classes is not permitted, though the spec does not rule it out for later:
The
:pastand:futurepseudo-classes are reserved for analogous use in the future. Any unsupported combination of these pseudo-classes with::search-textmust be treated as invalid.
After a match
A gap Christian Schaefer raises in "Rethinking Find-in-Page Accessibility": what happens once a search query matches content and the find session ends. Matched content currently stays visible after in-page search is closed or canceled. Conceivably another HTML hint will be needed for that behavior.
Further reading
- "Making collapsed content accessible with hidden=until-found" (Joey Arhar, Chrome for Developers)
- "Polyfilling hidden until-found" (Nathan Knowler)
- "Hidden until found" (James McGrath)
- "The
hidden=until-foundHTML attribute and thebeforematchevent" (WICG explainer, display-locking repo) - "Announcing Interop 2025" (WebKit Blog)
- Bugzilla Ticket #1761043
- MDN content update (GitHub issue)
::search-text(CSS Pseudo-Elements Module Level 4)



