From 5182324bf8a1d8ce1a67aab3834a7623e9fb9a38 Mon Sep 17 00:00:00 2001 From: Linda Paiste Date: Sat, 27 Jan 2024 14:25:25 -0600 Subject: [PATCH 1/6] Add aria attributes to menus. --- client/components/Dropdown/DropdownMenu.jsx | 3 ++- client/components/Dropdown/MenuItem.jsx | 2 +- client/components/Nav/NavBar.jsx | 2 +- client/components/Nav/NavDropdownMenu.jsx | 8 ++++++-- client/components/Nav/NavMenuItem.jsx | 2 +- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/client/components/Dropdown/DropdownMenu.jsx b/client/components/Dropdown/DropdownMenu.jsx index da41b30101..3371d1d6cc 100644 --- a/client/components/Dropdown/DropdownMenu.jsx +++ b/client/components/Dropdown/DropdownMenu.jsx @@ -38,7 +38,7 @@ const DropdownMenu = forwardRef( }; return ( -
+
-
    +
      {children} diff --git a/client/components/Nav/NavMenuItem.jsx b/client/components/Nav/NavMenuItem.jsx index 16e89355a3..dceabbf904 100644 --- a/client/components/Nav/NavMenuItem.jsx +++ b/client/components/Nav/NavMenuItem.jsx @@ -18,7 +18,7 @@ function NavMenuItem({ hideIf, className, ...rest }) { } return ( -
    • +
    • ); From b6ca02ab5d96bc116c7d95b116601686e48115d2 Mon Sep 17 00:00:00 2001 From: Tristan Espinoza Date: Tue, 16 Jul 2024 13:44:06 -0700 Subject: [PATCH 2/6] fix: added aria roles to file menu and menu items --- client/components/Nav/NavBar.jsx | 4 ++-- client/components/Nav/NavDropdownMenu.jsx | 13 +++++++------ client/components/Nav/NavMenuItem.jsx | 4 ++-- client/modules/IDE/components/Header/Nav.jsx | 8 ++++---- 4 files changed, 15 insertions(+), 14 deletions(-) diff --git a/client/components/Nav/NavBar.jsx b/client/components/Nav/NavBar.jsx index f5a072be97..f5afa76fee 100644 --- a/client/components/Nav/NavBar.jsx +++ b/client/components/Nav/NavBar.jsx @@ -69,11 +69,11 @@ function NavBar({ children, className }) { return (
      - +
); diff --git a/client/components/Nav/NavDropdownMenu.jsx b/client/components/Nav/NavDropdownMenu.jsx index 6af6427068..d2c5744c46 100644 --- a/client/components/Nav/NavDropdownMenu.jsx +++ b/client/components/Nav/NavDropdownMenu.jsx @@ -23,12 +23,13 @@ function NavDropdownMenu({ id, title, children }) { const { isOpen, handlers } = useMenuProps(id); return ( -
  • -
  • @@ -368,6 +372,7 @@ exports[`Nav renders dashboard version for mobile 1`] = ` > Examples @@ -378,14 +383,18 @@ exports[`Nav renders dashboard version for mobile 1`] = ` @@ -395,14 +404,18 @@ exports[`Nav renders dashboard version for mobile 1`] = ` @@ -412,14 +425,18 @@ exports[`Nav renders dashboard version for mobile 1`] = ` @@ -429,7 +446,9 @@ exports[`Nav renders dashboard version for mobile 1`] = ` @@ -439,6 +458,7 @@ exports[`Nav renders dashboard version for mobile 1`] = ` Reference @@ -449,6 +469,7 @@ exports[`Nav renders dashboard version for mobile 1`] = ` > About @@ -456,7 +477,7 @@ exports[`Nav renders dashboard version for mobile 1`] = `
    - + `; @@ -464,11 +485,12 @@ exports[`Nav renders dashboard version for mobile 1`] = ` exports[`Nav renders editor version for desktop 1`] = `
    - +
    `; @@ -900,7 +962,7 @@ exports[`Nav renders editor version for mobile 1`] = ` }
    - +
    `; diff --git a/client/modules/IDE/components/__snapshots__/SketchList.unit.test.jsx.snap b/client/modules/IDE/components/__snapshots__/SketchList.unit.test.jsx.snap index 051c95be19..fbb3c2e171 100644 --- a/client/modules/IDE/components/__snapshots__/SketchList.unit.test.jsx.snap +++ b/client/modules/IDE/components/__snapshots__/SketchList.unit.test.jsx.snap @@ -107,6 +107,7 @@ exports[` snapshot testing 1`] = ` class="sketch-list__dropdown-column" >