File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 22
22
text-align : left;
23
23
padding : 0 ;
24
24
}
25
+ [aria-disabled = "true" ] {
26
+ color : gray;
27
+ }
25
28
</ style >
26
29
</ head >
27
30
< body >
28
- < h1 > Base examples</ h1 >
31
+ < h1 > Examples</ h1 >
32
+ < h2 > Base examples</ h2 >
29
33
30
34
< details >
31
35
< summary > Best robot: < span data-menu-button > Unknown</ span > </ summary >
@@ -69,7 +73,19 @@ <h1>Base examples</h1>
69
73
</ details-menu >
70
74
</ details >
71
75
72
- < h1 > Autofocus example</ h1 >
76
+ < h2 > `aria-disabled="true" example</ h2 >
77
+ < p > menu items with < code > aria-disabled="true"</ code > should be keyboard navigable</ p >
78
+ < details >
79
+ < summary data-menu-button autofocus > Least favorite robots</ summary >
80
+ < details-menu >
81
+ < input type ="text " autofocus />
82
+ < button name ="robot " value ="Hubot " aria-disabled ="true " role ="menuitemradio " data-menu-button-text > Hubot</ button >
83
+ < button name ="robot " value ="Bender " role ="menuitemradio " data-menu-button-text > Bender</ button >
84
+ < button name ="robot " value ="BB-8 " role ="menuitemradio " data-menu-button-text > BB-8</ button >
85
+ </ details-menu >
86
+ </ details >
87
+
88
+ < h2 > Autofocus example</ h2 >
73
89
< p > < code > summary</ code > may have < code > autofocus</ code > so it's the initially focused element in the page.</ p >
74
90
< p >
75
91
Then any focusable element inside the popup can declare autofocus too, so it gets focus when the popup is opened.
You can’t perform that action at this time.
0 commit comments