Prechádzať zdrojové kódy

Ensure the sidebar account toggle has no duplicate accessible labels

- Remove the integration test for this element as it was failing even though the element has valid content.
- Fixes #11372
nandini584 1 rok pred
rodič
commit
a88a775aea

+ 1 - 0
CHANGELOG.txt

@@ -62,6 +62,7 @@ Changelog
  * Fix: Avoid duplicate entries in "Recent edits" panel when copying pages (Matt Westcott)
  * Fix: Prevent TitleFieldPanel from raising an error when the slug field is missing or read-only (Rohit Sharma)
  * Fix: Ensure that the close button on the new dialog designs is visible in the non-message variant (Nandini Arora)
+ * Fix: Ensure the sidebar account toggle has no duplicate accessible labels (Nandini Arora)
  * Docs: Document, for contributors, the use of translate string literals passed as arguments to tags and filters using `_()` within templates (Chiemezuo Akujobi)
  * Docs: Document all features for the Documents app in one location (Neeraj Yetheendran)
  * Docs: Add section to testing docs about creating pages and working with page content (Mariana Bedran Lesche)

+ 0 - 2
client/src/components/Sidebar/modules/MainMenu.tsx

@@ -310,9 +310,7 @@ export const Menu: React.FunctionComponent<MenuProps> = ({
             hover:w-bg-surface-menu-item-active
             focus:w-bg-surface-menu-item-active
             w-transition`}
-            title={gettext('Edit your account')}
             onClick={onClickAccountSettings}
-            aria-label={gettext('Edit your account')}
             aria-haspopup="menu"
             aria-expanded={accountSettingsOpen ? 'true' : 'false'}
             type="button"

+ 0 - 2
client/src/components/Sidebar/modules/__snapshots__/MainMenu.test.js.snap

@@ -20,7 +20,6 @@ exports[`Menu should render with the minimum required props 1`] = `
       <button
         aria-expanded="false"
         aria-haspopup="menu"
-        aria-label="Edit your account"
         className="
             w-px-5
             sidebar-footer__account
@@ -38,7 +37,6 @@ exports[`Menu should render with the minimum required props 1`] = `
             focus:w-bg-surface-menu-item-active
             w-transition"
         onClick={[Function]}
-        title="Edit your account"
         type="button"
       >
         <div

+ 0 - 8
client/tests/integration/homepage.test.js

@@ -36,12 +36,4 @@ describe('Homepage', () => {
       include: '.sidebar-main-menu',
     });
   });
-
-  it('axe sidebar footer', async () => {
-    const trigger = await page.$('[aria-label="Edit your account"]');
-    await trigger.click();
-    await expect(page).toPassAxeTests({
-      include: '.sidebar-footer',
-    });
-  });
 });

+ 1 - 0
docs/releases/6.0.md

@@ -90,6 +90,7 @@ Thank you to Thibaud Colas and Badr Fourane for their work on this feature.
  * Avoid duplicate entries in "Recent edits" panel when copying pages (Matt Westcott)
  * Prevent TitleFieldPanel from raising an error when the slug field is missing or read-only (Rohit Sharma)
  * Ensure that the close button on the new dialog designs is visible in the non-message variant (Nandini Arora)
+ * Ensure the sidebar account toggle has no duplicate accessible labels (Nandini Arora)
 
 
 ### Documentation