<?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>228843</bug_id>
          
          <creation_ts>2021-08-05 13:28:52 -0700</creation_ts>
          <short_desc>Implement auto-expanding details</short_desc>
          <delta_ts>2025-06-26 23:15:43 -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>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Joey Arhar">jarhar</reporter>
          <assigned_to name="Tim Nguyen (:ntim)">ntim</assigned_to>
          <cc>andresg_22</cc>
    
    <cc>aroselli</cc>
    
    <cc>bogdan.brinza</cc>
    
    <cc>bramus</cc>
    
    <cc>cdumez</cc>
    
    <cc>cfleizach</cc>
    
    <cc>emilio</cc>
    
    <cc>ggaren</cc>
    
    <cc>ggibson</cc>
    
    <cc>jcraig</cc>
    
    <cc>jhoffman23</cc>
    
    <cc>kevin_neal</cc>
    
    <cc>mike</cc>
    
    <cc>nicolas</cc>
    
    <cc>nils.reibold</cc>
    
    <cc>rik</cc>
    
    <cc>steven</cc>
    
    <cc>tyler_w</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1782324</commentid>
    <comment_count>0</comment_count>
    <who name="Joey Arhar">jarhar</who>
    <bug_when>2021-08-05 13:28:52 -0700</bug_when>
    <thetext>In this HTML spec PR, we are making &lt;details&gt; automatically expand for element fragments and find-in-page: https://github.com/whatwg/html/pull/6466
This way, the user can effectively use find-in-page to search for content hidden inside &lt;details&gt; elements without having to manually expand all of them first.
In order to make it performant, the spec PR also suggests using content-visibility:hidden inside &lt;details&gt;&apos;s user agent shadowdom instead of &quot;removing the slot from the rendering&quot; when &lt;details&gt; are closed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1783882</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-08-12 10:41:39 -0700</bug_when>
    <thetext>&lt;rdar://problem/81856620&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1983334</commentid>
    <comment_count>2</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2023-10-06 14:32:50 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/18785</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1992907</commentid>
    <comment_count>3</comment_count>
    <who name="James Craig">jcraig</who>
    <bug_when>2023-11-15 15:27:09 -0800</bug_when>
    <thetext>Whoever works on this feature, please work with WebKit Accessibility DRIs to make sure it works with accessibility, such as VoiceOver navigation by heading (VO+Cmd+H), where heading is in a collapsed section. Or VoiceOver Find (VO+F)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1993154</commentid>
    <comment_count>4</comment_count>
    <who name="sideshowbarker">mike</who>
    <bug_when>2023-11-16 10:01:29 -0800</bug_when>
    <thetext>(In reply to James Craig from comment #3)
&gt; Whoever works on this feature, please work with WebKit Accessibility DRIs to
&gt; make sure it works with accessibility, such as VoiceOver navigation by
&gt; heading (VO+Cmd+H), where heading is in a collapsed section. Or VoiceOver
&gt; Find (VO+F)

I have a PR ready for review at https://github.com/WebKit/WebKit/pull/18785. It doesn’t yet include any accessibility tests, and I’ve not yet done any manual testing of it myself with VoiceOver, but I’d love to get some guidance and review.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2001197</commentid>
    <comment_count>5</comment_count>
    <who name="Tyler Wilcock">tyler_w</who>
    <bug_when>2023-12-20 15:33:56 -0800</bug_when>
    <thetext>(In reply to sideshowbarker from comment #4)
&gt; (In reply to James Craig from comment #3)
&gt; &gt; Whoever works on this feature, please work with WebKit Accessibility DRIs to
&gt; &gt; make sure it works with accessibility, such as VoiceOver navigation by
&gt; &gt; heading (VO+Cmd+H), where heading is in a collapsed section. Or VoiceOver
&gt; &gt; Find (VO+F)
&gt; 
&gt; I have a PR ready for review at https://github.com/WebKit/WebKit/pull/18785.
&gt; It doesn’t yet include any accessibility tests, and I’ve not yet done any
&gt; manual testing of it myself with VoiceOver, but I’d love to get some
&gt; guidance and review.
VO-Cmd-H (find next heading) works via Accessibility::findMatchingObjects, which traverses the AX tree to try and find objects that match the given search key. AccessibilitySearchKey::Heading is one of many such keys. VO-F works similarly, searching the AX tree for the target AccessibilitySearchCriteria::searchText and comparing it against several different types of accessibility text.

Unfortunately, I don&apos;t think either will &quot;just work&quot; as the contents of collapsed details elements are not part of the AX tree (because they are not rendered, inherently excluding them). So we’ll need to do something special here.

Maybe we need to compute “collapsed descendants” for closed details element AX objects, which includes AX objects ignored only due to their lack of visibility / rendering. This collapsed descendants function would return early if the object’s role is not details, or if it is expanded.

Then we update `findMatchingObjects` to check an object’s collapsed descendants for matches. If a collapsed descendant is found to be a match, we’ll need to call `AXCoreObject::setIsExpanded(true)` on the containing details.

But this is pretty complicated, maybe there is some simpler solution here...not sure.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2106888</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2025-03-28 11:51:53 -0700</bug_when>
    <thetext>*** Bug 290170 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2108573</commentid>
    <comment_count>7</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2025-04-03 12:02:39 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/43558</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2126222</commentid>
    <comment_count>8</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2025-06-26 23:15:40 -0700</bug_when>
    <thetext>Committed 296708@main (23cdbeb3cd77): &lt;https://commits.webkit.org/296708@main&gt;

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

    </bug>

</bugzilla>