<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>238266</bug_id>
          
          <creation_ts>2022-03-23 09:34:08 -0700</creation_ts>
          <short_desc>Implement hidden=until-found HTML attribute and beforematch event</short_desc>
          <delta_ts>2025-07-07 12:39:47 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>DOM</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>290369</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joey Arhar">jarhar</reporter>
          <assigned_to name="Tim Nguyen (:ntim)">ntim</assigned_to>
          <cc>709922234</cc>
    
    <cc>bogdan.brinza</cc>
    
    <cc>cdumez</cc>
    
    <cc>cyb.ai.815</cc>
    
    <cc>koivisto</cc>
    
    <cc>lwarlow</cc>
    
    <cc>m.goleb+bugzilla</cc>
    
    <cc>mike</cc>
    
    <cc>ntim</cc>
    
    <cc>oliver.byford</cc>
    
    <cc>schaepp</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>thaivu100186</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>webkit</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1854207</commentid>
    <comment_count>0</comment_count>
    <who name="Joey Arhar">jarhar</who>
    <bug_when>2022-03-23 09:34:08 -0700</bug_when>
    <thetext>This feature was added to the HTML spec here: https://github.com/whatwg/html/pull/7475
Here is an explainer: https://github.com/WICG/display-locking/blob/main/explainers/hidden-content-explainer.md

The &quot;until-found&quot; value for the hidden attribute should make the element content-visibility:hidden instead of display:none. When the browser searches for text via find-in-page or ScrollToTextFragment, it should also search for text in hidden=until-found elements. If find-in-page or ScrollToTextFragment want to scroll to a match inside a hidden=until-found element, it should remove the hidden attribute from the element and fire the &quot;beforematch&quot; event on it in order to reveal the match.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1854229</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-03-23 10:01:02 -0700</bug_when>
    <thetext>&lt;rdar://problem/90706206&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2084906</commentid>
    <comment_count>2</comment_count>
    <who name="Michał Gołębiowski-Owczarek">m.goleb+bugzilla</who>
    <bug_when>2025-01-05 04:28:09 -0800</bug_when>
    <thetext>As stated in https://bugzilla.mozilla.org/show_bug.cgi?id=1761043, Wikipedia uses this attribute now, which means find in page works much better in Chrome on Android than on iOS. This is something I am hitting on a daily basis as an iOS user.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2084958</commentid>
    <comment_count>3</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2025-01-05 16:22:31 -0800</bug_when>
    <thetext>Bug 228843 can probably be used as inspiration if someone wants to hack this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2095109</commentid>
    <comment_count>4</comment_count>
    <who name="Christian &quot;Schepp&quot; Schaefer">schaepp</who>
    <bug_when>2025-02-17 00:11:16 -0800</bug_when>
    <thetext>I&apos;ve found one more use case where hidden=until-found is very helpful which I described here: https://schepp.dev/posts/rethinking-find-in-page-accessibility-making-hidden-text-work-for-everyone/

I&apos;m aware that this feature is part of Interop 2025 via &lt;details&gt; element, but maybe we can get this quicker than end of this year?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2126231</commentid>
    <comment_count>5</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2025-06-27 01:40:49 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/47284</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2128233</commentid>
    <comment_count>6</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-07-07 12:39:43 -0700</bug_when>
    <thetext>Committed 297073@main (4f12f2494d1c): &lt;https://commits.webkit.org/297073@main&gt;

Reviewed commits have been landed. Closing PR #47284 and removing active labels.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>