<?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>233320</bug_id>
          
          <creation_ts>2021-11-18 10:17:54 -0800</creation_ts>
          <short_desc>Update shadow DOM and dialog element focusing to latest spec</short_desc>
          <delta_ts>2022-07-29 13:01:32 -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>233777</dependson>
          <blocked>148695</blocked>
    
    <blocked>84635</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Domenic Denicola">d</reporter>
          <assigned_to name="Tim Nguyen (:ntim)">ntim</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>cdumez</cc>
    
    <cc>d</cc>
    
    <cc>jouni</cc>
    
    <cc>ntim</cc>
    
    <cc>rniwa</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>wenson_hsieh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1816498</commentid>
    <comment_count>0</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2021-11-18 10:17:54 -0800</bug_when>
    <thetext>The spec was previously not shadow DOM aware. In https://github.com/whatwg/html/pull/7285 we made it behave the same as delegatesFocus: they both &quot;delegate focus&quot; to either autofocus=&quot;&quot; if it&apos;s specified on a (non-shadow-including) descendant, or the first focusable element among their shadow-including descendants if not.

Tests: https://github.com/web-platform-tests/wpt/pull/31523</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1817822</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2021-11-25 10:18:18 -0800</bug_when>
    <thetext>&lt;rdar://problem/85753180&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1835542</commentid>
    <comment_count>2</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2022-01-31 08:15:55 -0800</bug_when>
    <thetext>After https://github.com/whatwg/html/pull/7361 and https://github.com/web-platform-tests/wpt/pull/31724 I believe this algorithm is now in good shape and implementable.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1848700</commentid>
    <comment_count>3</comment_count>
    <who name="Jouni Koivuviita">jouni</who>
    <bug_when>2022-03-07 05:35:26 -0800</bug_when>
    <thetext>I’m not entirely sure this is 100% related or worthy a new bug report, but there’s an issue in Safari Tech Preview 141, when the dialog and the content of the dialog are in different DOM &quot;scopes&quot; (light DOM vs shadow DOM).

The content is not focusable at all using the Tab key, and the dialog is not closed when clicking a button inside a &lt;form method=&quot;dialog&quot;&gt;.

Here’s a test case I created for the four different cases: https://jsbin.com/finugon/

- Dialog and content in light DOM (works)
- Dialog in light DOM, content in shadow DOM (broken)
- Dialog and content in shadow DOM (works)
- Dialog in shadow DOM, content in light DOM (slotted) (broken)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887468</commentid>
    <comment_count>4</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2022-07-28 15:33:14 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/2828</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887732</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-07-29 13:01:30 -0700</bug_when>
    <thetext>Committed 252959@main (696e8c1c47e2): &lt;https://commits.webkit.org/252959@main&gt;

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

    </bug>

</bugzilla>