You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><p>Let <var>direction</var> be "forward" if the user pressed <kbd>Tab</kbd>, or "backward" if the user pressed <kbd>Shift</kbd>+<kbd>Tab</kbd>.</p></li>
90241
90241
90242
-
<li><p>Let <var>items</var> be all <span data-x="focusgroup item">focusgroup items</span> in the same <span data-x="focusgroup scope">focusgroup scope</span> as the current <span data-x="key conflict element">key conflict element</span>, in <span>tree order</span>.</p></li>
90242
+
<li><p>Let <var>keyConflictElement</var> be the current <span data-x="key conflict element">key conflict element</span>.</p></li>
90243
90243
90244
-
<li><p>If <var>direction</var> is "forward", let <var>target</var> be the first item in <var>items</var> that follows the current <span data-x="key conflict element">key conflict element</span> in <span>tree order</span> and is <span>focusable</span>.</p></li>
90244
+
<li><p>Let <var>candidates</var> be all <span data-x="focusgroup item">focusgroup items</span> in the same <span data-x="focusgroup scope">focusgroup scope</span> as <var>keyConflictElement</var>, excluding <var>keyConflictElement</var> itself.</p></li>
90245
90245
90246
-
<li><p>If <var>direction</var> is "backward", let <var>target</var> be the last item in <var>items</var> that precedes the current <span data-x="key conflict element">key conflict element</span> in <span>tree order</span> and is <span>focusable</span>.</p></li>
90246
+
<li><p>If <var>direction</var> is "forward", let <var>eligibleItems</var> be all items in <var>candidates</var> that follow <var>keyConflictElement</var> in <span>tree order</span>.</p></li>
90247
90247
90248
-
<li><p>If <var>target</var> is not null, <span>move the focus</span> to <var>target</var>. The focusgroup's <span data-x="last focused item">last focused item</span> must not be considered during this process, though the <code data-x="attr-tabindex">tabindex</code> ordering continues to apply as in normal <span>sequential focus navigation</span>.</p></li>
90248
+
<li><p>If <var>direction</var> is "backward", let <var>eligibleItems</var> be all items in <var>candidates</var> that precede <var>keyConflictElement</var> in <span>tree order</span>.</p></li>
90249
+
90250
+
<li><p>Among <var>eligibleItems</var>, let <var>target</var> be the first item that would be focused according to the following priority order: first, the lowest positive <code data-x="attr-tabindex">tabindex</code> value; then elements with <code data-x="attr-tabindex">tabindex="0"</code> or implicit focusability; and finally, as the lowest priority, elements with <code data-x="attr-tabindex">tabindex="-1"</code>. Within each priority level, order by <span>tree order</span>.</p></li>
90251
+
90252
+
<li><p>If <var>target</var> is not null, <span>move the focus</span> to <var>target</var>. The focusgroup's <span data-x="last focused item">last focused item</span> must not be considered during this process.</p></li>
90249
90253
90250
90254
<li><p>Otherwise, follow the normal <span>sequential focus navigation</span> rules.</p></li>
<p>In this modified example, the priority order for escape behavior is:</p>
90296
+
<ul>
90297
+
<li>Pressing <kbd>Tab</kbd> from within the search input moves focus to the "Go" button (highest priority due to <code data-x="attr-tabindex">tabindex="1"</code>)</li>
90298
+
<li>If the "Go" button wasn't present, <kbd>Tab</kbd> would move to the "Print" button (medium priority due to <code data-x="attr-tabindex">tabindex="2"</code>)</li>
90299
+
<li>If neither positive <code data-x="attr-tabindex">tabindex</code> elements were present, <kbd>Tab</kbd> would move to the "Save" button (lowest priority due to <code data-x="attr-tabindex">tabindex="-1"</code>)</li>
90300
+
<li>Elements with <code data-x="attr-tabindex">tabindex="-1"</code> are considered as the fallback option when no higher-priority elements are available</li>
0 commit comments