diff --git a/packages/react-component-library/src/components/TopLevelNavigation/Masthead/Masthead.test.tsx b/packages/react-component-library/src/components/TopLevelNavigation/Masthead/Masthead.test.tsx index 36ccf0a5b2..495a25d430 100644 --- a/packages/react-component-library/src/components/TopLevelNavigation/Masthead/Masthead.test.tsx +++ b/packages/react-component-library/src/components/TopLevelNavigation/Masthead/Masthead.test.tsx @@ -386,6 +386,13 @@ describe('Masthead', () => { expect(wrapper.getByText('AB')).toBeInTheDocument() }) + it('should set the `aria-label` attribute on the search button to `Show search`', () => { + expect(wrapper.queryByTestId('user-button')).toHaveAttribute( + 'aria-label', + 'Show user options' + ) + }) + it('should not show the links', () => { expect(wrapper.queryByText('Profile')).toBeNull() expect(wrapper.queryByText('Settings')).toBeNull() diff --git a/packages/react-component-library/src/components/TopLevelNavigation/Masthead/MastheadUser.tsx b/packages/react-component-library/src/components/TopLevelNavigation/Masthead/MastheadUser.tsx index c9bb41d0ef..43233875d0 100644 --- a/packages/react-component-library/src/components/TopLevelNavigation/Masthead/MastheadUser.tsx +++ b/packages/react-component-library/src/components/TopLevelNavigation/Masthead/MastheadUser.tsx @@ -50,8 +50,9 @@ const MastheadUserWithItems: React.FC = ({