Skip to content

Commit ffd666a

Browse files
authored
Add a focusVisible option to element.focus()
Closes #7830.
1 parent 7a647c3 commit ffd666a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3867,6 +3867,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
38673867
<li><dfn
38683868
data-x-href="https://drafts.csswg.org/selectors/#the-focus-visible-pseudo"><code>:focus-visible</code></dfn>
38693869
pseudo-class</li>
3870+
<li><dfn data-x-href="https://drafts.csswg.org/selectors/#indicate-focus">indicate focus</dfn></li>
38703871
</ul>
38713872

38723873
<p>The following features are defined in <cite>CSS Values and Units</cite>: <ref
@@ -77470,6 +77471,7 @@ END:VCARD</pre>
7747077471

7747177472
<pre><code class="idl">dictionary <dfn dictionary>FocusOptions</dfn> {
7747277473
boolean <span data-x="dom-focusoptions-preventscroll">preventScroll</span> = false;
77474+
boolean <span data-x="dom-focusoptions-focusvisible">focusVisible</span>;
7747377475
};</code></pre>
7747477476

7747577477
<dl class="domintro">
@@ -77630,6 +77632,11 @@ END:VCARD</pre>
7763077632

7763177633
<li><p>Run the <span>focusing steps</span> for the element.</p></li>
7763277634

77635+
<li><p>If the value of the <dfn dict-member for="FocusOptions"><code
77636+
data-x="dom-focusoptions-focusvisible">focusVisible</code></dfn> dictionary member of
77637+
<var>options</var> is true, or is not present but in an <span>implementation-defined</span> way
77638+
the user agent determines it would be best to do so, then <span>indicate focus</span>.</p></li>
77639+
7763377640
<li><p>If the value of the <dfn dict-member for="FocusOptions"><code
7763477641
data-x="dom-focusoptions-preventscroll">preventScroll</code></dfn> dictionary member of
7763577642
<var>options</var> is false, then <span data-x="scroll an element into view">scroll the element

0 commit comments

Comments
 (0)