11
11
< script src ="../../js/highlight.pack.js "> </ script >
12
12
< script src ="../../js/app.js "> </ script >
13
13
14
+ <!-- CSS and javascript for this example. -->
14
15
< link href ="css/menubarAction.css " rel ="stylesheet ">
15
-
16
16
< script src ="js/styleManager.js " type ="text/javascript "> </ script >
17
-
18
17
< script src ="js/MenubarAction.js " type ="text/javascript "> </ script >
19
18
< script src ="js/MenubarItemAction.js " type ="text/javascript "> </ script >
20
19
< script src ="js/PopupMenuAction.js " type ="text/javascript "> </ script >
@@ -32,14 +31,12 @@ <h1>Editor Menubar Example</h1>
32
31
The following example demonstrates using the
33
32
< a href ="../../../#menu "> menubar design pattern</ a >
34
33
to provide access to sets of actions.
35
- Each item in this example menubar represents a category of text
36
- formatting commands. The formatting commands are revealed in popup menus that can be opened from
37
- items in the menubar. This example also demonstrates < code > menuitemradio</ code > and < code > menuitemcheckbox</ code > elements.
34
+ Each item in the below menubar identifies a category of text formatting actions that can be executed from its submenu.
35
+ The submenus also demonstrate < code > menuitemradio</ code > and < code > menuitemcheckbox</ code > elements.
38
36
</ p >
39
-
40
37
< p > Similar examples include: </ p >
41
38
< ul >
42
- < li > < a href ="../menubar-1/menubar-1.html "> Navigation Menubar Example</ a > : Example of a menubar with popup menus with navigational links .</ li >
39
+ < li > < a href ="../menubar-1/menubar-1.html "> Navigation Menubar Example</ a > : A menubar that presents site navigation menus .</ li >
43
40
</ ul >
44
41
45
42
< section id ="code-ex-1 ">
@@ -126,18 +123,19 @@ <h2 id="ex1_label">Example</h2>
126
123
127
124
</ div >
128
125
< div role ="separator " id ="ex1_end_sep " aria-labelledby ="ex1_end_sep ex1_label " aria-label ="End of " > </ div >
129
- < h4 > Notes</ h4 >
126
+ </ section >
127
+
128
+ < section >
129
+ < h2 > Accessibility Features</ h2 >
130
130
< ol >
131
- < li > Menu radio buttons and checkboxes indicate the current format settings.</ li >
131
+ < li > Users of assistive technologies can identify which format settings are selected because they are represented by menu item radio and menu item checkbox elements that have a checked state .</ li >
132
132
< li > Disabled menu items are demonstrated in the font size menu, which includes two disabled menuitems .</ li >
133
- < li > CSS < code > :after</ code > is used to render the down arrow in a menubar item using the CSS < code > content</ code > property string using entity values.</ li >
134
- < li > CSS < code > :before</ code > is used to render checks using the CSS < code > content</ code > property string using entity values on < code > menuritemadio</ code > and < code > menuitemcheckbox</ code > items.</ li >
133
+ < li > The down arrow and checked icons are made compatible with high contrast mode and hidden from screen readers by using the CSS < code > content</ code > property to render images.</ li >
135
134
</ ol >
136
135
</ section >
137
-
136
+
138
137
< section >
139
138
< h2 id ="kbd_label "> Keyboard Support</ h2 >
140
-
141
139
< h3 id ="kbd1_label "> Menubar</ h3 >
142
140
< table aria-labelledby ="kbd1_label kbd_label " class ="def ">
143
141
< thead >
@@ -149,9 +147,9 @@ <h3 id="kbd1_label">Menubar</h3>
149
147
< tbody >
150
148
< tr >
151
149
< th >
152
- < kbd > Space or Enter</ kbd >
150
+ < kbd > Space</ kbd > < br > < kbd > Enter</ kbd >
153
151
</ th >
154
- < td > Opens popup menu and places focus on the first item in the popup .</ td >
152
+ < td > Opens submenu and moves focus to first item in the submenu .</ td >
155
153
</ tr >
156
154
< tr >
157
155
< th >
@@ -179,13 +177,13 @@ <h3 id="kbd1_label">Menubar</h3>
179
177
< th >
180
178
< kbd > Down Arrow</ kbd >
181
179
</ th >
182
- < td > Opens popup menu and places focus on the first item in the popup .</ td >
180
+ < td > Opens submenu and moves focus to first item in the submenu .</ td >
183
181
</ tr >
184
182
< tr >
185
183
< th >
186
184
< kbd > Up Arrow</ kbd >
187
185
</ th >
188
- < td > Opens popup menu and places focus on the last item in the popup .</ td >
186
+ < td > Opens submenu and moves focus to last item in the submenu .</ td >
189
187
</ tr >
190
188
< tr >
191
189
< th >
@@ -213,7 +211,7 @@ <h3 id="kbd1_label">Menubar</h3>
213
211
</ tbody >
214
212
</ table >
215
213
216
- < h3 id ="kbd2_label "> Popup </ h3 >
214
+ < h3 id ="kbd2_label "> Submenu </ h3 >
217
215
< table aria-labelledby ="kbd2_label kbd_label " class ="def ">
218
216
< thead >
219
217
< tr >
@@ -224,23 +222,18 @@ <h3 id="kbd2_label">Popup</h3>
224
222
< tbody >
225
223
< tr >
226
224
< th >
227
- < kbd > Space or Enter</ kbd >
225
+ < kbd > Space</ kbd > < br > < kbd > Enter</ kbd >
228
226
</ th >
229
- < td >
230
- < ul >
231
- < li > Executes action or command, e.g., bolds text, change font.</ li >
232
- < li > Implements optional behavior of a popup menu staying open after activating a < code > menuitemradio</ code > or < code > menuitemcheckbox</ code > . This allows for users to visually see the change in state before they close the popup menu with an additional keyboard command.</ li >
233
- </ ul >
234
- </ td >
227
+ < td > Activates menu item, causing action to be executed, e.g., bold text, change font. </ td >
235
228
</ tr >
236
229
< tr >
237
230
< th >
238
231
< kbd > Escape</ kbd >
239
232
</ th >
240
233
< td >
241
234
< ul >
242
- < li > Closes popup menu .</ li >
243
- < li > Places focus on parent menubar item.</ li >
235
+ < li > Closes submenu .</ li >
236
+ < li > Moves focus to parent menubar item.</ li >
244
237
</ ul >
245
238
</ td >
246
239
</ tr >
@@ -250,9 +243,9 @@ <h3 id="kbd2_label">Popup</h3>
250
243
</ th >
251
244
< td >
252
245
< ul >
253
- < li > Closes popup menu .</ li >
246
+ < li > Closes submenu .</ li >
254
247
< li > Moves focus to next item in the menubar.</ li >
255
- < li > Opens popup menu for newly focused item, leaving focus in the menubar.</ li >
248
+ < li > Opens submenu of newly focused menubar item, keeping focus on that parent menubar item .</ li >
256
249
</ ul >
257
250
</ td >
258
251
</ tr >
@@ -262,9 +255,9 @@ <h3 id="kbd2_label">Popup</h3>
262
255
</ th >
263
256
< td >
264
257
< ul >
265
- < li > Closes popup menu .</ li >
258
+ < li > Closes submenu .</ li >
266
259
< li > Moves focus to previous item in the menubar.</ li >
267
- < li > Opens popup menu for newly focused item, leaving focus in the menubar.</ li >
260
+ < li > Opens submenu of newly focused menubar item, keeping focus on that parent menubar item .</ li >
268
261
</ ul >
269
262
</ td >
270
263
</ tr >
@@ -274,7 +267,7 @@ <h3 id="kbd2_label">Popup</h3>
274
267
</ th >
275
268
< td >
276
269
< ul >
277
- < li > Moves focus to the next item in the popup .</ li >
270
+ < li > Moves focus to the next item in the submenu .</ li >
278
271
< li > If focus is on the last item, moves focus to the first item.</ li >
279
272
</ ul >
280
273
</ td >
@@ -285,7 +278,7 @@ <h3 id="kbd2_label">Popup</h3>
285
278
</ th >
286
279
< td >
287
280
< ul >
288
- < li > Moves focus to previous item in the popup .</ li >
281
+ < li > Moves focus to previous item in the submenu .</ li >
289
282
< li > If focus is on the first item, moves focus to the last item.</ li >
290
283
</ ul >
291
284
</ td >
@@ -294,13 +287,13 @@ <h3 id="kbd2_label">Popup</h3>
294
287
< th >
295
288
< kbd > Home</ kbd >
296
289
</ th >
297
- < td > Moves focus to the first item in the popup .</ td >
290
+ < td > Moves focus to the first item in the submenu .</ td >
298
291
</ tr >
299
292
< tr >
300
293
< th >
301
294
< kbd > End</ kbd >
302
295
</ th >
303
- < td > Moves focus to the last item in the popup .</ td >
296
+ < td > Moves focus to the last item in the submenu .</ td >
304
297
</ tr >
305
298
< tr >
306
299
< th >
@@ -319,7 +312,6 @@ <h3 id="kbd2_label">Popup</h3>
319
312
320
313
< section >
321
314
< h2 id ="rps_label "> Role, Property, State, and Tabindex Attributes</ h2 >
322
-
323
315
< h3 id ="rps1_label "> Menubar</ h3 >
324
316
< table aria-labelledby ="rps1_label rps_label " class ="data attributes ">
325
317
< thead >
@@ -341,12 +333,8 @@ <h3 id="rps1_label">Menubar</h3>
341
333
</ td >
342
334
< td >
343
335
< ul >
344
- < li >
345
- Identifies the < code > ul</ code > element as a container for set of < code > menuitem</ code > widgets associated with the menubar.
346
- </ li >
347
- < li >
348
- Is not focusable because focus is managed using < a href ="../../../#kbd_roving_tabindex "> roving tabindex</ a > ,
349
- </ li >
336
+ < li > Identifies the element as a < code > menubar</ code > container for a set of < code > menuitem</ code > elements.</ li >
337
+ < li > Is not focusable because focus is managed using < a href ="../../../#kbd_roving_tabindex "> roving tabindex.</ a > </ li >
350
338
</ ul >
351
339
</ td >
352
340
</ tr >
@@ -378,7 +366,7 @@ <h3 id="rps1_label">Menubar</h3>
378
366
< code > li</ code >
379
367
</ td >
380
368
< td >
381
- Identifies the < code > li </ code > element as a menu item within the menubar widget .
369
+ Identifies the element as a menu item within the menubar.
382
370
</ td >
383
371
</ tr >
384
372
< tr >
@@ -415,8 +403,7 @@ <h3 id="rps1_label">Menubar</h3>
415
403
When the page loads, the first item in the menubar has < code > tabindex="0"</ code > .
416
404
</ li >
417
405
< li >
418
- Focus is managed using < a href ="../../../#kbd_roving_tabindex "> roving tabindex</ a > ,
419
- so the most recently focused item will be in the page < kbd > Tab</ kbd > sequence.
406
+ Focus is managed using < a href ="../../../#kbd_roving_tabindex "> roving tabindex</ a > .
420
407
</ li >
421
408
</ ul >
422
409
</ td >
@@ -430,7 +417,7 @@ <h3 id="rps1_label">Menubar</h3>
430
417
< code > li</ code >
431
418
</ td >
432
419
< td >
433
- Identifies the < code > menuitem</ code > as having a child popup menu .
420
+ Indicates that the < code > menuitem</ code > has a submenu .
434
421
</ td >
435
422
</ tr >
436
423
< tr >
@@ -442,7 +429,7 @@ <h3 id="rps1_label">Menubar</h3>
442
429
< code > li</ code >
443
430
</ td >
444
431
< td >
445
- Indicates the child popup menu is open.
432
+ Indicates the submenu is open.
446
433
</ td >
447
434
</ tr >
448
435
< tr >
@@ -454,13 +441,12 @@ <h3 id="rps1_label">Menubar</h3>
454
441
< code > li</ code >
455
442
</ td >
456
443
< td >
457
- Indicates the child popup menu is closed.
444
+ Indicates the submenu is closed.
458
445
</ td >
459
446
</ tr >
460
447
</ tbody >
461
448
</ table >
462
-
463
- < h3 id ="rps2_label "> Popup Menu</ h3 >
449
+ < h3 id ="rps2_label "> Submenu</ h3 >
464
450
< table aria-labelledby ="rps2_label rps_label " class ="data attributes ">
465
451
< thead >
466
452
< tr >
@@ -482,10 +468,10 @@ <h3 id="rps2_label">Popup Menu</h3>
482
468
< td >
483
469
< ul >
484
470
< li >
485
- Identifies the < code > ul </ code > element as a container for set of < code > menuitem</ code > widgets associated with the menu .
471
+ Identifies the element as a menu container for a set of < code > menuitem</ code > elements .
486
472
</ li >
487
473
< li >
488
- Is not focusable because focus is managed using < a href ="../../../#kbd_roving_tabindex "> roving tabindex</ a > ,
474
+ Is not focusable because focus is managed using < a href ="../../../#kbd_roving_tabindex "> roving tabindex. </ a >
489
475
</ li >
490
476
</ ul >
491
477
</ td >
@@ -511,7 +497,7 @@ <h3 id="rps2_label">Popup Menu</h3>
511
497
< code > li</ code >
512
498
</ td >
513
499
< td >
514
- Identifies the < code > li </ code > element as a menu item in the popup menu .
500
+ Identifies the element as an item in the submenu .
515
501
</ td >
516
502
</ tr >
517
503
< tr >
@@ -535,7 +521,7 @@ <h3 id="rps2_label">Popup Menu</h3>
535
521
< code > li</ code >
536
522
</ td >
537
523
< td >
538
- Identifies the < code > li </ code > element as a menuitemcheckbox widget .
524
+ Identifies the element as a < code > menuitemcheckbox</ code > .
539
525
</ td >
540
526
</ tr >
541
527
< tr >
@@ -564,10 +550,7 @@ <h3 id="rps2_label">Popup Menu</h3>
564
550
Indicates that the < code > menuitemcheckbox</ code > is checked.
565
551
</ li >
566
552
< li >
567
- The visual state of the selection is synchronized with the < code > aria-checked</ code >
568
- value using CSS attribute selectors, e.g., [aria-checked="true"],
569
- the CSS pseudo selector < code > :before</ code > ,
570
- and the < code > content</ code > property.
553
+ The visual appearance of the selected state is synchronized with the < code > aria-checked</ code > value using CSS attribute selectors.
571
554
</ li >
572
555
</ ul >
573
556
</ td >
@@ -586,10 +569,7 @@ <h3 id="rps2_label">Popup Menu</h3>
586
569
Indicates that the < code > menuitemcheckbox</ code > is < strong > NOT</ strong > checked.
587
570
</ li >
588
571
< li >
589
- The visual state of the selection is synchronized with the < code > aria-checked</ code >
590
- value using CSS attribute selectors, e.g., [aria-checked="true"],
591
- the CSS pseudo selector < code > :before</ code > ,
592
- and the < code > content</ code > property.
572
+ The visual appearance of the selected state is synchronized with the < code > aria-checked</ code > value using CSS attribute selectors.
593
573
</ li >
594
574
</ ul >
595
575
</ td >
@@ -605,7 +585,7 @@ <h3 id="rps2_label">Popup Menu</h3>
605
585
< td >
606
586
< ul >
607
587
< li >
608
- Identifies the < code > ul </ code > element as a container for a set of < code > menuitemradio</ code > widgets .
588
+ Identifies the element as a container for a set of < code > menuitemradio</ code > elements .
609
589
</ li >
610
590
< li >
611
591
Enables browsers to compute values of < code > aria-setsize</ code > and < code > aria-posinset</ code > .
@@ -624,11 +604,11 @@ <h3 id="rps2_label">Popup Menu</h3>
624
604
< td >
625
605
< ul >
626
606
< li >
627
- Identifies the < code > li </ code > element as a < code > menuitemradio</ code > widget .
607
+ Identifies the element as a < code > menuitemradio</ code > element .
628
608
</ li >
629
609
< li >
630
- In this example the menuitemradio group is defined by either < code > ul[role="menu"] </ code >
631
- or < code > [role=" group"] </ code > .
610
+ When all items in a submenu are members of the same radio group,
611
+ the group is defined by the < code > menu </ code > element; a < code > group</ code > element is not necessary .
632
612
</ li >
633
613
</ ul >
634
614
</ td >
@@ -659,10 +639,7 @@ <h3 id="rps2_label">Popup Menu</h3>
659
639
Indicates the < code > menuitemradio</ code > is checked.
660
640
</ li >
661
641
< li >
662
- The visual state of the selection is synchronized with the < code > aria-checked</ code >
663
- value using CSS attribute selectors, e.g., [aria-checked="true"],
664
- the CSS pseudo selector < code > :before</ code > ,
665
- and the < code > content</ code > property.
642
+ The visual appearance of the selected state is synchronized with the < code > aria-checked</ code > value using CSS attribute selectors.
666
643
</ li >
667
644
</ ul >
668
645
</ td >
@@ -681,10 +658,7 @@ <h3 id="rps2_label">Popup Menu</h3>
681
658
Indicates that the < code > menuitemradio</ code > is < strong > NOT</ strong > checked.
682
659
</ li >
683
660
< li >
684
- The visual state of the selection is synchronized with the < code > aria-checked</ code >
685
- value using CSS attribute selectors, e.g., [aria-checked="true"],
686
- the CSS pseudo selector < code > :before</ code > ,
687
- and the < code > content</ code > property.
661
+ The visual appearance of the selected state is synchronized with the < code > aria-checked</ code > value using CSS attribute selectors.
688
662
</ li >
689
663
</ ul >
690
664
</ td >
@@ -710,10 +684,10 @@ <h2>Javascript and CSS Source Code</h2>
710
684
Javascript: < a href ="js/PopupMenuAction.js " type ="text/javascript "> PopupMenuAction.js</ a >
711
685
</ li >
712
686
< li >
713
- Javascript: < a href ="js/MenuItemAction .js " type ="text/javascript "> MenuItemAction .js</ a >
687
+ Javascript: < a href ="js/PopupMenuItemAction .js " type ="text/javascript "> PopupMenuItemAction .js</ a >
714
688
</ li >
715
689
< li >
716
- Javascript: < a href ="js/TextStyling .js " type ="text/javascript "> TextStyling .js</ a >
690
+ Javascript: < a href ="js/styleManager .js " type ="text/javascript "> styleManager .js</ a >
717
691
</ li >
718
692
</ ul >
719
693
</ section >
0 commit comments