File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -18,10 +18,13 @@ const menu = (() => {
1818 .menu-body { background-color: rgba(0,0,0,0.6); min-height: 250px; }
1919 .menu-body ul { list-style: none; padding: 0; }
2020 .menu-body li { list-style-type: none; border: 1px solid #fff; width: 80%; text-align: center; margin: 5px auto; opacity: 1; }
21- .menu-body li:hover { text-decoration: underline; opacity: 0.4; }
21+ .menu-body li:hover, .menu-body li:focus { text-decoration: underline; opacity: 0.4; }
2222 </style>` ) ;
2323 body = $ ( '<div class="menu-body">' ) ;
2424 wrapper = $ ( '<div class="menu-backdrop">' )
25+ . attr ( {
26+ role : 'Menu' ,
27+ } )
2528 . append ( $ ( '<div class="menu-content">' )
2629 . append (
2730 `<div class="menu-header"><span class="menu-close right">×</span>MENU</div>` ,
@@ -41,8 +44,13 @@ const menu = (() => {
4144 // Generate buttons
4245 if ( ! cooked ) {
4346 body . html ( '' ) ; // Clear current buttons
47+ let index = 1 ;
4448 buttons . forEach ( ( data ) => {
4549 const button = $ ( '<li>' ) ;
50+ button . attr ( {
51+ role : 'button' ,
52+ tabindex : index ++ ,
53+ } ) ;
4654 if ( data . url ) {
4755 // Make text a url
4856 } else {
You can’t perform that action at this time.
0 commit comments