Skip to content

Commit

Permalink
updated regression test for aria-hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
howard-e authored and mcking65 committed Nov 14, 2021
1 parent 0624fa1 commit b76a134
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions test/tests/menubar_menubar-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -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);

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit b76a134

Please sign in to comment.