Skip to content

Commit cde7f45

Browse files
committed
Quick pass on the directional navigation algorithm, still needs work.
1 parent 1b996a7 commit cde7f45

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

source

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90307,22 +90307,18 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
9030790307
<p>When a user presses an arrow key and focus is within a <span data-x="focusgroup scope">focusgroup scope</span>, the user agent must run these steps:</p>
9030890308

9030990309
<ol>
90310-
<li><p>Let <var>owner</var> be the <span data-x="focusgroup owner">focusgroup owner</span>.</p></li>
90310+
<li><p>Let <var>direction</var> be "forwards" or "backwards" corresponding to the arrow key pressed, and the document's direction.
90311+
<li><p>Let <var>owner</var> be the element with the <code data-x="dom-focusgroup">focusgroup</code>attribute set with a valid behavior.</p></li>
9031190312

90312-
<li><p>Let <var>currentItem</var> be the currently focused element.</p></li>
90313+
<li><p>Let <var>currentItem</var> be the currently focused element within the focusgroup.</p></li>
9031390314

9031490315
<li><p>Let <var>items</var> be all <span data-x="focusgroup item">focusgroup items</span> in <span>tree order</span>.</p></li>
9031590316

90316-
<li><p>Determine the <var>nextItem</var> by finding the geometrically nearest item in the direction of the arrow key, respecting the <var>owner</var>'s <span>'writing-mode'</span> and <span>'direction'</span>:</p>
90317-
<ul class="brief">
90318-
<li>If the <code data-x="attr-focusgroup-inline">inline</code> token is present, only consider items on the inline axis.</li>
90319-
<li>If the <code data-x="attr-focusgroup-block">block</code> token is present, only consider items on the block axis.</li>
90320-
</ul>
90321-
</li>
90317+
<li><p>Determine the <var>nextItem</var> by finding the nearest item in tree order in the <var>direction</var>. </p></li>
9032290318

9032390319
<li><p>If no <var>nextItem</var> is found and the <code data-x="attr-focusgroup-wrap">wrap</code> token is present, wrap to the first item in the specified direction.</p></li>
9032490320

90325-
<li><p>If a <var>nextItem</var> is identified, <span>move the focus</span> to it. This must not affect the <span>sequential focus navigation order</span>.</p></li>
90321+
<li><p>If a <var>nextItem</var> is identified, <span>move the focus</span> to it.</p></li>
9032690322
</ol>
9032790323
</div>
9032890324

0 commit comments

Comments
 (0)