From b76a134b39312b812b263df3b8d743904d06ca73 Mon Sep 17 00:00:00 2001 From: Howard Edwards Date: Tue, 9 Nov 2021 19:04:32 -0500 Subject: [PATCH] updated regression test for aria-hidden --- test/tests/menubar_menubar-editor.js | 43 ++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/test/tests/menubar_menubar-editor.js b/test/tests/menubar_menubar-editor.js index 84a4e0586f..3c32e810ab 100644 --- a/test/tests/menubar_menubar-editor.js +++ b/test/tests/menubar_menubar-editor.js @@ -16,6 +16,7 @@ const ex = { menuitemcheckboxSelector: '#ex1 [role="menuitemcheckbox"]', groupSelector: '#ex1 [role="group"]', menuitemradioSelector: '#ex1 [role="menuitemradio"]', + ariaHiddenSpanSelector: '#ex1 [aria-hidden]', numMenus: 4, numSubmenuItems: [4, 10, 4, 7], allSubmenuItems: [ @@ -269,6 +270,20 @@ ariaTest( } ); +ariaTest( + 'Visual character entities to show expanded state on role="menuitem" is hidden from assistive technology', + exampleFile, + 'menubar-menuitem-aria-hidden', + async (t) => { + await assertAttributeValues( + t, + ex.ariaHiddenSpanSelector, + 'aria-hidden', + 'true' + ); + } +); + ariaTest('Test for role="menu" on ul', exampleFile, 'menu-role', async (t) => { const submenus = await t.context.queryElements(t, ex.submenuSelector); @@ -524,6 +539,20 @@ ariaTest( } ); +ariaTest( + 'Visual character entities to show checked state on role="menuitemcheckbox" is hidden from assistive technology', + exampleFile, + 'menuitemcheckbox-aria-hidden', + async (t) => { + await assertAttributeValues( + t, + ex.ariaHiddenSpanSelector, + 'aria-hidden', + 'true' + ); + } +); + ariaTest( 'Test role="separator" exists', exampleFile, @@ -633,6 +662,20 @@ ariaTest( } ); +ariaTest( + 'Visual character entities to show checked state on role="menuitemradio" is hidden from assistive technology', + exampleFile, + 'menuitemradio-aria-hidden', + async (t) => { + await assertAttributeValues( + t, + ex.ariaHiddenSpanSelector, + 'aria-hidden', + 'true' + ); + } +); + // KEYS ariaTest(