[refactor] improve menu tab index and focus on open
This commit is contained in:
parent
388d30c063
commit
42d732fd39
|
@ -89,13 +89,13 @@
|
||||||
|
|
||||||
<ul class="menu-nav u-list-unstyled">
|
<ul class="menu-nav u-list-unstyled">
|
||||||
<li class="menu-nav-item">
|
<li class="menu-nav-item">
|
||||||
<button class="menu-nav-button button button-block button-large active" data-target=".menu-content-area-header">Header</button>
|
<button class="menu-nav-button button button-block button-large active" data-target=".menu-content-area-header" tabindex="1">Header</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="menu-nav-item">
|
<li class="menu-nav-item">
|
||||||
<button class="menu-nav-button button button-block button-large" data-target=".menu-content-area-bookmarks">Bookmarks</button>
|
<button class="menu-nav-button button button-block button-large" data-target=".menu-content-area-bookmarks" tabindex="1">Bookmarks</button>
|
||||||
</li>
|
</li>
|
||||||
<li class="menu-nav-item">
|
<li class="menu-nav-item">
|
||||||
<button class="menu-nav-button button button-block button-large" data-target=".menu-content-area-layout">Layout</button>
|
<button class="menu-nav-button button button-block button-large" data-target=".menu-content-area-layout" tabindex="1">Layout</button>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="menu-content">
|
<div class="menu-content">
|
||||||
|
|
|
@ -46,6 +46,7 @@ var menu = (function() {
|
||||||
var html = helper.e("html");
|
var html = helper.e("html");
|
||||||
if (state.get().menu.active) {
|
if (state.get().menu.active) {
|
||||||
helper.addClass(html, "is-menu-open");
|
helper.addClass(html, "is-menu-open");
|
||||||
|
helper.e(".menu-nav-button.active").focus();
|
||||||
shade.render({
|
shade.render({
|
||||||
action: function() {
|
action: function() {
|
||||||
close();
|
close();
|
||||||
|
|
Loading…
Reference in New Issue