Skip to content

Commit 2bfbc7e

Browse files
committed
Quick pass on the directional navigation algorithm, still needs work.
1 parent 9a29698 commit 2bfbc7e

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
@@ -90303,22 +90303,18 @@ dictionary <dfn dictionary>DragEventInit</dfn> : <span>MouseEventInit</span> {
9030390303
<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>
9030490304

9030590305
<ol>
90306-
<li><p>Let <var>owner</var> be the <span data-x="focusgroup owner">focusgroup owner</span>.</p></li>
90306+
<li><p>Let <var>direction</var> be "forwards" or "backwards" corresponding to the arrow key pressed, and the document's direction.
90307+
<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>
9030790308

90308-
<li><p>Let <var>currentItem</var> be the currently focused element.</p></li>
90309+
<li><p>Let <var>currentItem</var> be the currently focused element within the focusgroup.</p></li>
9030990310

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

90312-
<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>
90313-
<ul class="brief">
90314-
<li>If the <code data-x="attr-focusgroup-inline">inline</code> token is present, only consider items on the inline axis.</li>
90315-
<li>If the <code data-x="attr-focusgroup-block">block</code> token is present, only consider items on the block axis.</li>
90316-
</ul>
90317-
</li>
90313+
<li><p>Determine the <var>nextItem</var> by finding the nearest item in tree order in the <var>direction</var>. </p></li>
9031890314

9031990315
<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>
9032090316

90321-
<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>
90317+
<li><p>If a <var>nextItem</var> is identified, <span>move the focus</span> to it.</p></li>
9032290318
</ol>
9032390319
</div>
9032490320

0 commit comments

Comments
 (0)