From 7ca10daf12f2cac9fecf559b11f0f0c8bd21ae43 Mon Sep 17 00:00:00 2001 From: Ryan Garrett <25553660+ryan-garrett@users.noreply.github.com> Date: Mon, 20 Jun 2022 11:30:25 +0100 Subject: [PATCH] Mis-nesting of aria roles on sidebar navigation (#2050) --- e2e/integration/search.e2e.ts | 2 +- src/components/SideMenu/MenuItems.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/e2e/integration/search.e2e.ts b/e2e/integration/search.e2e.ts index dfc38b0347..5785ee807a 100644 --- a/e2e/integration/search.e2e.ts +++ b/e2e/integration/search.e2e.ts @@ -45,7 +45,7 @@ describe('Search', () => { getSearchInput().type('{enter}', { force: true }); - cy.contains('[role=navigation] [role=menuitem]', 'Introduction').should('have.class', 'active'); + cy.contains('[role=menu] [role=menuitem]', 'Introduction').should('have.class', 'active'); }); it('should mark search results', () => { diff --git a/src/components/SideMenu/MenuItems.tsx b/src/components/SideMenu/MenuItems.tsx index f87913431c..e2e97f6491 100644 --- a/src/components/SideMenu/MenuItems.tsx +++ b/src/components/SideMenu/MenuItems.tsx @@ -26,7 +26,7 @@ export class MenuItems extends React.Component { className={className} style={this.props.style} expanded={expanded} - {...(root ? { role: 'navigation' } : {})} + {...(root ? { role: 'menu' } : {})} > {items.map((item, idx) => (