Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add shadow host consideration for :focus selector #4731

Merged
merged 10 commits into from
Sep 24, 2019
25 changes: 19 additions & 6 deletions source
Original file line number Diff line number Diff line change
@@ -3160,7 +3160,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute

<li><dfn data-x-href="https://dom.spec.whatwg.org/#concept-node-document">node document</dfn> concept</li>
<li><dfn data-x="concept-DocumentFragment-host" data-x-href="https://dom.spec.whatwg.org/#concept-documentfragment-host">host</dfn> concept</li>
<li><dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-root">shadow root</dfn> concept</li>
<li>The <dfn data-x-href="https://dom.spec.whatwg.org/#concept-shadow-root">shadow root</dfn> concept</li>

<li><dfn data-x-href="https://dom.spec.whatwg.org/#interface-htmlcollection"><code>HTMLCollection</code></dfn> interface</li>
<li><dfn data-x="dom-HTMLCollection-length" data-x-href="https://dom.spec.whatwg.org/#dom-htmlcollection-length"><code>HTMLCollection.length</code></dfn> attribute</li>
@@ -68942,11 +68942,23 @@ Demos:
<dt><dfn data-noexport=""><code data-x="selector-focus">:focus</code></dfn></dt>
<dd>
<p>For the purposes of the CSS <code data-x="selector-focus">:focus</code>
<span>pseudo-class</span>, an <dfn>element has the focus</dfn> when its <span>top-level browsing
context</span> has the system focus, it is not itself a <span>browsing context container</span>,
and it is one of the elements listed in the <span>focus chain</span> of the <span
data-x="currently focused area of a top-level browsing context">currently focused area of the
top-level browsing context</span>.</p>
<span>pseudo-class</span>, an <dfn>element has the focus</dfn> when:</p>

<ul>
<li><p>its <span>top-level browsing context</span> has the system focus;</p></li>
<li><p>it is not itself a <span>browsing context container</span>; and</p></li>
domenic marked this conversation as resolved.
Show resolved Hide resolved
<li>
rakina marked this conversation as resolved.
Show resolved Hide resolved
domenic marked this conversation as resolved.
Show resolved Hide resolved
<p>at least one of the following is true:</p>
domenic marked this conversation as resolved.
Show resolved Hide resolved
<ul>
domenic marked this conversation as resolved.
Show resolved Hide resolved
<li><p>it is one of the elements listed in the <span>focus chain</span> of the <span
data-x="currently focused area of a top-level browsing context">currently focused area of
the top-level browsing context</span>, or</p></li>
<li><p>its<span data-x="concept-element-shadow-root">shadow root</span> <var>shadowRoot</var>
is not null and <var>shadowRoot</var> is the <span>root</span> of at least one element that
domenic marked this conversation as resolved.
Show resolved Hide resolved
<span data-x="element has the focus">has the focus</span>.</p></li>
</ul>
</li>
</ul>
domenic marked this conversation as resolved.
Show resolved Hide resolved
</dd>

<dt><dfn data-noexport=""><code data-x="selector-target">:target</code></dfn></dt>
@@ -124223,6 +124235,7 @@ INSERT INTERFACES HERE
Rahul Purohit,
Raj Doshi,
Rajas Moonka,
Rakina Zata Amni,
Ralf Stoltze,
Ralph Giles,
Raphael Champeimont,