From efa7a9bb124d42c2fdfe53e1c8968353f20f8ce6 Mon Sep 17 00:00:00 2001 From: TJ Egan Date: Wed, 15 Jul 2020 12:00:02 -0700 Subject: [PATCH] fix(SideNav): a11y fixes for SideNavMenu, MenuItem (#6468) * fix(SideNav): a11y fixes for SideNavMenu, MenuItem * chore(snapshot): update snapshots --- .../components/src/components/ui-shell/_side-nav.scss | 5 ++--- packages/react/src/components/UIShell/SideNavMenu.js | 1 - packages/react/src/components/UIShell/SideNavMenuItem.js | 4 ++-- .../__tests__/__snapshots__/SideNavMenu-test.js.snap | 2 -- .../__tests__/__snapshots__/SideNavMenuItem-test.js.snap | 9 --------- 5 files changed, 4 insertions(+), 17 deletions(-) diff --git a/packages/components/src/components/ui-shell/_side-nav.scss b/packages/components/src/components/ui-shell/_side-nav.scss index d51d53f45743..b4f502e7b41f 100644 --- a/packages/components/src/components/ui-shell/_side-nav.scss +++ b/packages/components/src/components/ui-shell/_side-nav.scss @@ -353,7 +353,7 @@ //---------------------------------------------------------------------------- // Side-nav > Navigation > {Menu,Submenu} //---------------------------------------------------------------------------- - .#{$prefix}--side-nav__submenu[aria-haspopup='true'] { + .#{$prefix}--side-nav__submenu { @include button-reset($width: true); @include type-style('productive-heading-01'); @include focus-outline('reset'); @@ -573,8 +573,7 @@ // Variants - Fixed //---------------------------------------------------------------------------- .#{$prefix}--side-nav--fixed a.#{$prefix}--side-nav__link, - .#{$prefix}--side-nav--fixed - .#{$prefix}--side-nav__submenu[aria-haspopup='true'] { + .#{$prefix}--side-nav--fixed .#{$prefix}--side-nav__submenu { padding-left: mini-units(2); } diff --git a/packages/react/src/components/UIShell/SideNavMenu.js b/packages/react/src/components/UIShell/SideNavMenu.js index c5292dd31cab..901af742cd82 100644 --- a/packages/react/src/components/UIShell/SideNavMenu.js +++ b/packages/react/src/components/UIShell/SideNavMenu.js @@ -155,7 +155,6 @@ export class SideNavMenu extends React.Component { // eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions