
diff --git a/client/src/components/Sidebar/modules/__snapshots__/MainMenu.test.js.snap b/client/src/components/Sidebar/modules/__snapshots__/MainMenu.test.js.snap
new file mode 100644
index 0000000000..cfaad0e459
--- /dev/null
+++ b/client/src/components/Sidebar/modules/__snapshots__/MainMenu.test.js.snap
@@ -0,0 +1,45 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`Menu should render with the minimum required props 1`] = `
+
+
+
+
+
+
+
+`;
diff --git a/client/tests/integration/homepage.test.js b/client/tests/integration/homepage.test.js
index 83fe98fd25..33b2159a9d 100644
--- a/client/tests/integration/homepage.test.js
+++ b/client/tests/integration/homepage.test.js
@@ -18,7 +18,9 @@ describe('Homepage', () => {
});
it('axe page explorer', async () => {
- const trigger = await page.$('[aria-haspopup="dialog"]');
+ const trigger = await page.$(
+ '.sidebar-page-explorer-item [aria-haspopup="menu"]',
+ );
await trigger.click();
await expect(page).toPassAxeTests({
include: '.sidebar-main-menu',
@@ -26,7 +28,9 @@ describe('Homepage', () => {
});
it('axe sidebar sub-menu', async () => {
- const trigger = await page.$('[aria-haspopup="true"]');
+ const trigger = await page.$(
+ '.sidebar-sub-menu-item [aria-haspopup="menu"]',
+ );
await trigger.click();
await expect(page).toPassAxeTests({
include: '.sidebar-main-menu',
diff --git a/docs/releases/2.17.md b/docs/releases/2.17.md
index a06e04a21f..3d0b67ff1c 100644
--- a/docs/releases/2.17.md
+++ b/docs/releases/2.17.md
@@ -53,6 +53,9 @@ The panel types `StreamFieldPanel`, `RichTextFieldPanel`, `ImageChooserPanel`, `
* Improve the contrast of the “Remember me” checkbox against the login page’s background (Steven Steinwand)
* Group permission rows with custom permissions no longer have extra padding (Steven Steinwand)
* Make sure the focus outline of checkboxes is fully around the outer border (Steven Steinwand)
+ * Consistently set `aria-haspopup="menu"` for all sidebar menu items that have sub-menus (LB (Ben Johnston))
+ * Make sure `aria-expanded` is always explicitly set as a string in sidebar (LB (Ben Johnston))
+ * Use a button element instead of a link for page explorer menu item, for the correct semantics and behavior (LB (Ben Johnston))
## Upgrade considerations