File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed
packages/react/src/components/UIShell Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -15,11 +15,8 @@ import { AriaLabelPropType } from '../../prop-types/AriaPropTypes';
1515
1616const { prefix } = settings ;
1717
18- const defaultRenderMenuContent = ( { ariaLabel } ) => (
19- < >
20- { ariaLabel }
21- < ChevronDownGlyph className = { `${ prefix } --header__menu-arrow` } />
22- </ >
18+ const defaultRenderMenuContent = ( ) => (
19+ < ChevronDownGlyph className = { `${ prefix } --header__menu-arrow` } />
2320) ;
2421
2522/**
@@ -176,17 +173,14 @@ class HeaderMenu extends React.Component {
176173 < a // eslint-disable-line jsx-a11y/role-supports-aria-props,jsx-a11y/anchor-is-valid
177174 aria-haspopup = "menu" // eslint-disable-line jsx-a11y/aria-proptypes
178175 aria-expanded = { this . state . expanded }
179- className = { cx (
180- `${ prefix } --header__menu-item` ,
181- `${ prefix } --header__menu-title`
182- ) }
176+ className = { `${ prefix } --header__menu-item ${ prefix } --header__menu-title` }
183177 href = "javascript:void(0)"
184178 onKeyDown = { this . handleOnKeyDown }
185179 ref = { this . handleMenuButtonRef }
186180 role = "menuitem"
187181 tabIndex = { 0 }
188- ariaLabel = { ariaLabel } >
189- < MenuContent ariaLabel = { ariaLabel } />
182+ { ... accessibilityLabel } >
183+ < MenuContent />
190184 </ a >
191185 < ul
192186 { ...accessibilityLabel }
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ describe('HeaderMenu', () => {
6262 const headerMenu = wrapper . childAt ( 0 ) ;
6363 const headerMenuText = headerMenu
6464 . find ( `.${ prefix } --header__menu-title` )
65- . text ( ) ;
65+ . prop ( 'aria-label' ) ;
6666
6767 expect ( headerMenuText ) . toMatch ( 'Accessibility label' ) ;
6868 } ) ;
You can’t perform that action at this time.
0 commit comments