Skip to content

Commit

Permalink
Add a focusVisible option to element.focus()
Browse files Browse the repository at this point in the history
Closes #7830.
  • Loading branch information
emilio authored Jul 13, 2022
1 parent 7a647c3 commit ffd666a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -3867,6 +3867,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn
data-x-href="https://drafts.csswg.org/selectors/#the-focus-visible-pseudo"><code>:focus-visible</code></dfn>
pseudo-class</li>
<li><dfn data-x-href="https://drafts.csswg.org/selectors/#indicate-focus">indicate focus</dfn></li>
</ul>

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

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

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

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

<li><p>If the value of the <dfn dict-member for="FocusOptions"><code
data-x="dom-focusoptions-focusvisible">focusVisible</code></dfn> dictionary member of
<var>options</var> is true, or is not present but in an <span>implementation-defined</span> way
the user agent determines it would be best to do so, then <span>indicate focus</span>.</p></li>

<li><p>If the value of the <dfn dict-member for="FocusOptions"><code
data-x="dom-focusoptions-preventscroll">preventScroll</code></dfn> dictionary member of
<var>options</var> is false, then <span data-x="scroll an element into view">scroll the element
Expand Down

0 comments on commit ffd666a

Please sign in to comment.