A reader lands on a news story cut in half by a "Continue reading" button. They want one detail, the departure time, so they press Ctrl+F and type it. Zero results. The text is right there on the page.

Roy Keur opens day 4 of the HTMHell Advent Calendar with exactly that pattern, and it fails more than the find bar. A link to a page anchor inside the collapsed part goes nowhere. A text fragment URL like #:~:text=departure%20time highlights nothing. For anyone who gets around long pages by searching or following deep links, the collapsed part of your page doesn't exist.

What display: none takes away

Here is the simplified markup Keur uses for that "Continue reading" pattern:

<button type="button" aria-expanded="false"> Continue reading this article </button> <p data-readmore-hidden="1" style="display: none;"> You can either use a catamaran, which takes one hour and fifteen minutes with departure time at 11:30, or take the slower cruise ship which takes two hours and 30 minutes, with departure time at 9:30. </p> 

Keur's point is that display: none hides content from the user agent too, and the user agent runs the search. The hidden attribute is no better, because the user agent stylesheet applies display: none to it.

What until-found does differently

hidden="until-found" uses content-visibility: hidden instead. The element keeps its box and its contents go unrendered. The browser also holds on to state such as scroll positions, where display: none throws it away.

When a find-in-page search or a text fragment matches text inside that element, the browser fires a beforematch event on the element, removes until-found, then scrolls to the match. The attribute stays off for the rest of the session, even after the find bar closes.

Keur states two limits. Setting content-visibility yourself doesn't make an element searchable; only hidden="until-found" does. And the value does not expose the content to screen readers, so don't count it as an assistive-tech fix.

Wiring it into an accordion

Keur starts from the Accordion Example in the ARIA Authoring Practices Guide, which already hides its panels with hidden. Making the panels searchable means adding one value to an attribute that's already there:

<div id="sect1" role="region" aria-labelledby="accordion1id" class="accordion-panel" hidden="until-found"> Some hidden content. </div> 

You still need JavaScript to toggle the panel and keep aria-expanded in sync with it. Listen for beforematch and update the trigger button when a search opens its panel. Skip that and the button still reports the panel as collapsed after a search has opened it. Keur notes that beforematch only fires on elements with hidden="until-found", so a listener on content you've clipped some other way never fires.

Why not just use <details>? It works the same way underneath, with content-visibility, and you get native collapse plus a visible marker for free. Use it when you can. Keur's case for the scripted accordion is headings. Put one inside <summary>, as Scott O'Hara has documented, and browsers and screen readers may treat it as presentational. An accordion built on hidden="until-found" keeps its <h3> intact. The trade-off is that until-found gives sighted users no visual hint that anything is collapsed, so your trigger button has to do that job.

Support and the fallback

According to Keur, Chromium has shipped hidden="until-found" since Chrome 102 in 2022, and Firefox 148 followed in February 2026. Safari 26.2 shipped it in December 2025 along with beforematch. Safari's support still counts as partial because it doesn't yet scroll to the revealed match (WebKit bug 304174).

Browsers that don't support it treat the attribute as plain hidden, so the fallback is display: none. That's a progressive enhancement, but Keur would rather the fallback show the content with display: block. When JavaScript is disabled, he would also set content-visibility: visible and hide the toggle button, using @media (scripting: none). I agree. A fallback that hides content still loses it.

The reader mode gap

Here is the part that should slow you down. Reader mode is non-standard and each engine implements it differently, but Keur's rule of thumb is that hidden content stays hidden, and until-found is no exception: "Any element with the hidden attribute set, even with until-found as its value and even when overridden with display: block, will always be hidden in reader mode."

People switch to reader mode because they need the page easier to read. On a long article where you collapse sections with until-found, those readers lose the collapsed sections. The only workaround Keur sees is duplicating the content and hiding the copy some other way, such as opacity: 0 or clipping, and he doesn't recommend it.

Verdict

hidden="until-found" is a real fix for a real exclusion, and it builds on HTML you probably already ship. Treat it as a findability fix and nothing more. It doesn't help screen reader users, and it doesn't help reader mode users at all.

Before your next PR:

  • Collapsing content in an accordion or a "read more"? Use <details> or hidden="until-found", not display: none.
  • Handle beforematch and update aria-expanded when a search reveals a panel.
  • Make sure the trigger button shows that content is collapsed, since until-found won't.
  • Decide on purpose what non-supporting browsers and no-JS sessions show. Visible beats gone.
  • On long-form articles, ask whether the content needs collapsing at all. Reader mode will hide it either way.