Hidden until found The HTML `hidden="until-found"` attribute allows developers to hide collapsible content while keeping it accessible to browser find-in-page, assistive technologies, and search engines. When a user searches for text within a collapsed element, the browser automatically expands it and fires a `beforematch` event, enabling developers to sync widget state without JavaScript workarounds. This approach solves a key accessibility gap in common accordion and tab patterns that use `display: none`, which removes content from find-in-page and the accessibility tree entirely. Hidden until found Use hidden="until-found" for collapsible content so that browser find-in-page, assistive tech, and search engines can still reach the text and auto-expand it. What it is hidden="until-found" is a value of the global hidden attribute defined in the HTML Standard. An element marked this way renders as if hidden — it takes up no visible space — but the browser’s find-in-page Ctrl/Cmd+F , the fragment-directive scroll-to-text, and scrollIntoView still walk through it. When a match is found inside, the browser fires a beforematch event on the element, removes the hidden attribute, and scrolls the match into view. The browser’s user-agent stylesheet applies content-visibility: hidden to elements in the until-found state, and the find-in-page algorithm has a specific exception for that state — when a match would land inside the subtree, it walks the element, removes the hidden attribute, and scrolls into view. Applying content-visibility: hidden directly in author CSS does not get you the same behaviour. Per the CSS Containment specification, contents in that state are skipped from rendering and are not visible to screen readers, find-in-page, or other tools. The reachability is a property of the HTML attribute, not the CSS property. Why it matters display: none removes content from the accessibility tree and from find-in-page entirely. Accordion or tab patterns that hide panels with display: none are invisible to a user who knows the exact phrase they want.- Find-in-page is a primary accessibility tool. Keyboard users, screen-reader users, users with cognitive disabilities, and anyone skimming a long document rely on it to locate content directly. - Search engines and AI crawlers vary in how they treat content hidden with display: none . hidden="until-found" keeps the text in the DOM and reachable, which is the honest signal: this is real content, just collapsed by default. How to implement Mark each collapsed panel and listen for beforematch so your widget state stays in sync: