diff --git a/server-ce/test/editor.spec.ts b/server-ce/test/editor.spec.ts index 9ff5af17b3..773121141f 100644 --- a/server-ce/test/editor.spec.ts +++ b/server-ce/test/editor.spec.ts @@ -140,7 +140,7 @@ describe('editor', function () { describe('file menu', function () { it('can download project sources', function () { cy.findByRole('button', { name: 'File' }).click() - cy.findByRole('link', { name: 'Download' }).click() + cy.findByRole('menuitem', { name: 'Download' }).click() cy.findByRole('menuitem', { name: 'Download as source (.zip)' }).click() const zipName = projectName.replaceAll('-', '_') cy.task('readFileInZip', { @@ -157,7 +157,7 @@ describe('editor', function () { ) cy.findByRole('button', { name: 'File' }).click() - cy.findByRole('link', { name: 'Download' }).click() + cy.findByRole('menuitem', { name: 'Download' }).click() cy.findByRole('menuitem', { name: 'Download as PDF' }).click() const pdfName = projectName.replaceAll('-', '_') cy.task('readPdf', `cypress/downloads/${pdfName}.pdf`).should( diff --git a/services/web/frontend/js/shared/components/menu-bar/menu-bar-dropdown.tsx b/services/web/frontend/js/shared/components/menu-bar/menu-bar-dropdown.tsx index 834a1dbc32..798b028ad7 100644 --- a/services/web/frontend/js/shared/components/menu-bar/menu-bar-dropdown.tsx +++ b/services/web/frontend/js/shared/components/menu-bar/menu-bar-dropdown.tsx @@ -91,6 +91,8 @@ const NestedDropdownToggle: FC = forwardRef< 'nested-dropdown-toggle', 'dropdown-item' )} + role="menuitem" + aria-haspopup > {children} @@ -122,6 +124,8 @@ export const NestedMenuBarDropdown: FC< show={active} autoClose onToggle={onToggle} + as="li" + role="none" > void + role?: AriaRole } export type DropdownItemProps = PropsWithChildren<{