File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 24
24
</ style >
25
25
</ head >
26
26
< body >
27
+ < h1 > Base examples</ h1 >
28
+
27
29
< details >
28
30
< summary > Best robot: < span data-menu-button > Unknown</ span > </ summary >
29
31
< details-menu >
60
62
</ details-menu >
61
63
</ details >
62
64
65
+ < h1 > Autofocus example</ h1 >
66
+ < p > < code > summary</ code > may have < code > autofocus</ code > so it's the initially focused element in the page.</ p >
67
+ < p > Then any focusable element inside the popup can declare autofocus too, so it gets focus when the popup is opened.</ p >
68
+
69
+ < details >
70
+ < summary data-menu-button autofocus > Autofocus picker</ summary >
71
+ < details-menu >
72
+ < input type ="text " placeholder ="Autofocus wannabe filter " autofocus />
73
+ < button type ="submit " name ="robot " value ="Hubot " role ="menuitemradio " data-menu-button-text > Hubot</ button >
74
+ < button type ="submit " name ="robot " value ="Bender " role ="menuitemradio " data-menu-button-text > Bender</ button >
75
+ < button type ="submit " name ="robot " value ="BB-8 " role ="menuitemradio " data-menu-button-text > BB-8</ button >
76
+ </ details-menu >
77
+ </ details >
78
+
63
79
< script type ="text/javascript ">
64
80
document . addEventListener ( 'details-menu-selected' , e => console . log ( e ) )
65
81
</ script >
You can’t perform that action at this time.
0 commit comments