ARIA in HTML - test case for aria-readonly

last updated 28 February 2021

The readonly attribute is allowed on input type=text, search, url, tel, email, password, date, month, week, time, datetime-local, number. It is NOT RECOMMENDED to use aria-readonly on these elements.

aria-readonly=false is not allowed on an element with contenteditable.

Tests:

Test 1

Authors SHOULD NOT use the aria-readonly="true" on any element which also has a readonly attribute.

The following inputs have readonly and aria-readonly=true set.

Expected result:
warning for unnecessary use of aria-readonly=true when element has readonly.

Test 2

Authors MUST NOT use aria-readonly="false" on any element which also has a readonly attribute.

The following inputs have readonly and aria-readonly=false set.

Expected result:
error for use of aria-readonly=false which is in opposition of readonly