Skip to content

Commit 9958956

Browse files
committed
Consolidate the various event related tables
Remove unneeded fields, mark the tables as non normative (events are normatively defined by the processing model), and merge the tables from the event section with the table from the overview section.
1 parent ce6053c commit 9958956

2 files changed

Lines changed: 149 additions & 288 deletions

File tree

index.bs

Lines changed: 44 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -180,38 +180,7 @@ and if desired to provide an alternate action,
180180
such as using calling the {{HTMLElement/focus()}} method on a different
181181
element of the author's choosing.
182182

183-
The following table summarizes the events that may be sent:
184-
185-
<table class="complex data">
186-
<thead>
187-
<tr>
188-
<td colspan=2></td>
189-
<th colspan=2>Attributes of the event
190-
<tr>
191-
<th>Event type
192-
<th>Description
193-
<th>{{NavigationEvent/dir}}
194-
<th>{{NavigationEvent/relatedTarget}}
195-
</thead>
196-
<tbody>
197-
<tr>
198-
<td><dfn event for=NavigationEvent>navbeforefocus</dfn>
199-
<td>Fired before spatial or <a href="https://html.spec.whatwg.org/multipage/interaction.html#sequential-focus-navigation">sequential</a> navigation changes the focus.
200-
<td rowspan=3>The intended direction of the navigation as requested by the user
201-
<td>The <a>DOM anchor</a> of the <a>focusable area</a> that will be focused
202-
<tr>
203-
<td><dfn event for=NavigationEvent>navbeforescroll</dfn>
204-
<td>Fired before spatial navigation triggers scrolling
205-
<td>The element that will be scrolled
206-
<tr>
207-
<td><dfn event for=NavigationEvent>navnotarget</dfn>
208-
<td>Fired when spatial navigation has failed to find any acceptable candidate to move the focus to
209-
in the current <a>spatnav container</a>
210-
and when that same <a>spatnav container</a> cannot be scrolled either,
211-
before going up the tree to search in the nearest ancestor <a>spatnav container</a>.
212-
<td>The <a>spatnav container</a> that was searched in.
213-
</tbody>
214-
</table>
183+
See [[#events-nav-type]] for details about the various events.
215184

216185
<div class='example'>
217186
In this example, a series of elements are arranged in the <a>spatial navigation focus container</a>.
@@ -414,14 +383,17 @@ Navigation Events</h2>
414383
See [[#overview]] for a high level description of the various types of {{NavigationEvent}} which may be dispatched,
415384
and [[#processing-model]] for details.
416385

417-
<h3 id="events-nav-type">
386+
<h3 id="events-nav-type" class="non-normative">
418387
Navigation Event Types</h3>
419388

420-
The Navigation event types are listed below.
389+
<em>This section and its subsections are not normative.</em>
421390

422-
<h4 id="event-type-navbeforefocus">
423-
<dfn>navbeforefocus</dfn></h4>
424-
The <a>navbeforefocus</a> event occurs when there is a target to move focus in sequential or spatial navigation.
391+
The Navigation event types are summarized below.
392+
For full normative details, see [[#processing-model]].
393+
394+
<h4 id="event-type-navbeforefocus" class="non-normative">
395+
<dfn event for=NavigationEvent>navbeforefocus</dfn></h4>
396+
The <a event>navbeforefocus</a> event occurs before spatial or <a href="https://html.spec.whatwg.org/multipage/interaction.html#sequential-focus-navigation">sequential</a> navigation changes the focus.
425397
<table class="def">
426398
<tbody>
427399
<tr>
@@ -430,29 +402,21 @@ Navigation Events</h2>
430402
<tr>
431403
<th>Interface
432404
<td>{{NavigationEvent}}
433-
<tr>
434-
<th>Sync / Async
435-
<td>Sync
436405
<tr>
437406
<th>Bubbles
438-
<td>No
439-
<tr>
440-
<th>Trusted Targets
441-
<td><code>Element</code>
407+
<td>Yes
442408
<tr>
443409
<th>Cancelable
444410
<td>Yes
445411
<tr>
446-
<th>Default action
447-
<td>None
448-
<tr>
449-
<th>Context (trusted events)
450-
<td><ul>
451-
<li>{{NavigationEvent}}.{{NavigationEvent/relatedTarget}} :
452-
event target receiving focus by spatial navigation</li>
453-
<li>{{NavigationEvent}}.{{NavigationEvent/dir}} :
454-
direction of the navigation as requested by the user</li>
455-
</ul>
412+
<th>Attributes of the event
413+
<td><dl>
414+
<dt>{{NavigationEvent}}.{{NavigationEvent/relatedTarget}}
415+
<dd>The DOM anchor of the focusable area that will be focused
416+
417+
<dt>{{NavigationEvent}}.{{NavigationEvent/dir}}
418+
<dd>The direction of the navigation as requested by the user
419+
</dl>
456420
</tbody>
457421
</table>
458422

@@ -495,9 +459,9 @@ Navigation Events</h2>
495459
</table>
496460
</div>
497461

498-
<h4 id="event-type-navbeforescroll">
499-
<dfn>navbeforescroll</dfn></h4>
500-
The <a>navbeforescroll</a> event occurs before spatial navigation triggers scrolling.
462+
<h4 id="event-type-navbeforescroll" class="non-normative">
463+
<dfn event for=NavigationEvent>navbeforescroll</dfn></h4>
464+
The <a event>navbeforescroll</a> event occurs before spatial navigation triggers scrolling.
501465
<table class="def">
502466
<tbody>
503467
<tr>
@@ -506,37 +470,30 @@ Navigation Events</h2>
506470
<tr>
507471
<th>Interface
508472
<td>{{NavigationEvent}}
509-
<tr>
510-
<th>Sync / Async
511-
<td>Sync
512473
<tr>
513474
<th>Bubbles
514-
<td>No
515-
<tr>
516-
<th>Trusted Targets
517-
<td><code>Element</code>
475+
<td>Yes
518476
<tr>
519477
<th>Cancelable
520478
<td>Yes
521479
<tr>
522-
<th>Default action
523-
<td>None
524-
<tr>
525-
<th>Context (trusted events)
526-
<td><ul>
527-
<li>{{NavigationEvent}}.{{NavigationEvent/relatedTarget}} :
528-
event target which is scrollable and receives focus by spatial navigation</li>
529-
<li>{{NavigationEvent}}.{{NavigationEvent/dir}} :
530-
direction of the navigation as requested by the user</li>
531-
</ul>
480+
<th>Attributes of the event
481+
<td><dl>
482+
<dt>{{NavigationEvent}}.{{NavigationEvent/relatedTarget}}
483+
<dd>The element that will be scrolled if the event is not cancelled
484+
485+
<dt>{{NavigationEvent}}.{{NavigationEvent/dir}}
486+
<dd>The direction of the navigation as requested by the user
487+
</dl>
532488
</tbody>
533489
</table>
534490

535-
<h4 id="event-type-navnotarget">
536-
<dfn>navnotarget</dfn></h4>
537-
The <a>navnotarget</a> event occurs when spatial navigation has failed to find any candidate
491+
<h4 id="event-type-navnotarget" class="non-normative">
492+
<dfn event for=NavigationEvent>navnotarget</dfn></h4>
493+
The <a event>navnotarget</a> event occurs when spatial navigation has failed to find any candidate
538494
to move the focus to in the current <a>spatnav container</a> and
539-
when that same <a>spatnav container</a> is at the <a>scroll boundary</a>.
495+
when that same <a>spatnav container</a> cannot be scrolled either,
496+
before going up the tree to search in the nearest ancestor <a>spatnav container</a>.
540497
<table class="def">
541498
<tbody>
542499
<tr>
@@ -545,29 +502,21 @@ Navigation Events</h2>
545502
<tr>
546503
<th>Interface
547504
<td>{{NavigationEvent}}
548-
<tr>
549-
<th>Sync / Async
550-
<td>Sync
551505
<tr>
552506
<th>Bubbles
553-
<td>No
554-
<tr>
555-
<th>Trusted Targets
556-
<td><code>Element</code>
507+
<td>Yes
557508
<tr>
558509
<th>Cancelable
559510
<td>Yes
560511
<tr>
561-
<th>Default action
562-
<td>None
563-
<tr>
564-
<th>Context (trusted events)
565-
<td><ul>
566-
<li>{{NavigationEvent}}.{{NavigationEvent/relatedTarget}} :
567-
event target which is the <a>spatnav container</a></li>
568-
<li>{{NavigationEvent}}.{{NavigationEvent/dir}} :
569-
direction of the navigation as requested by the user</li>
570-
</ul>
512+
<th>Attributes of the event
513+
<td><dl>
514+
<dt>{{NavigationEvent}}.{{NavigationEvent/relatedTarget}}
515+
<dd>The <a>spatnav container</a> that was searched in.
516+
517+
<dt>{{NavigationEvent}}.{{NavigationEvent/dir}}
518+
<dd>The direction of the navigation as requested by the user
519+
</dl>
571520
</tbody>
572521
</table>
573522

0 commit comments

Comments
 (0)