ARIA in HTML - test cases for popovertarget and command with unnecessary use of aria-expanded

last updated 23 July 2025

popovertarget attribute is allowed on button elements.

command attribute is allowed on button elements.

Tests:

Test 1

Authors MUST NOT use the aria-expanded attribute on any element which also has a popovertarget attribute.

test 1 popover

Expected result:
error for inappropriate use of aria-expanded when element has popovertarget attribute which implicitly handles aria-expanded states.

Test 2

Authors MUST NOT use the aria-expanded attribute on any element which will have a popovertarget attribute set due to adding it via the popoverTargetElement IDL attribute.

test 2 popover

Expected result:
error for inappropriate use of aria-expanded when element has popovertarget attribute which implicitly handles aria-expanded states.

Test 3

Authors MUST NOT use the aria-expanded attribute on any element which also has a command attribute.

test 3 popover

Expected result:
error for inappropriate use of aria-expanded when element has popovertarget attribute which implicitly handles aria-expanded states.

Test 4

Authors MUST NOT use the aria-expanded attribute on any element which will have a command attribute set due to adding it via the popoverTargetElement IDL attribute.

test 4 popover

Expected result:
error for inappropriate use of aria-expanded when element has popovertarget attribute which implicitly handles aria-expanded states.