Skip to content

Commit

Permalink
fix(component): megamenu accessibility
Browse files Browse the repository at this point in the history
nav-link padding and outline on focus
tabindex fix on go back function
  • Loading branch information
ygatesoupe committed Feb 2, 2017
1 parent f5c3a75 commit f0836cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion js/src/o-megamenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const MegaMenu = (($) => {

// make only visible elements focusable
$targetNav.find(Selector.NAV_LINK).attr({'tabindex': '0', 'aria-hidden': false})
if(currentTranslatePos === -100) {
if(currentTranslatePercentage === -100) {
$rootNav.find('>.nav-item .nav-link').attr({'tabindex': '0', 'aria-hidden': false})
}

Expand Down
12 changes: 6 additions & 6 deletions scss/_o-navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@
}

.nav-item {
padding: 1rem 0 1rem .625rem;
// padding: 1rem 0 1rem .625rem;
margin-left: 0;
font-size: $font-size-h5;
line-height: 1;
Expand Down Expand Up @@ -354,15 +354,15 @@

.nav-item > .nav-link {
@include focus {
outline: 0;
outline-offset: -1px;
}

padding: 0;
padding: 1rem 0 1rem .625rem;
margin-top: 0;
}

.nav-item > .nav-link.icon {
padding: .78125rem .625rem;
margin-top: 0;
}

.nav-item.dropdown {
Expand Down Expand Up @@ -395,11 +395,11 @@
}

.mega-menu > .navbar-nav > .nav-item {
padding: 1rem 0 0;
// padding: 1rem 0 0;
}

.mega-menu > .navbar-nav > .nav-item > .nav-link {
margin: 0 0 1rem .625rem;
// margin: 0 0 1rem .625rem;
}

.mega-menu .nav-link[data-toggle="collapse"]::before {
Expand Down

0 comments on commit f0836cd

Please sign in to comment.