ARIA in HTML - test case for additional role allowances for button and input type=button elements

last updated 15 February 2023

Tests:

Allowances for input type=reset, input type=image and type=submit

Authors are allowed to use the roles button, checkbox, combobox, gridcell, link, menuitem, menuitemcheckbox, menuitemradio, option, radio, slider, switch, tab or treeitem on a input type=reset, input type=image or input type=submit element.

All allowed roles on the button element are now allowed on these elements as well. While there are far better elements to use as a base for these roles, if an author has no other choice and they end up using these elements to make an otherwise accessible custom widget, there is no reason to preclude their use as other automated and manual checks can call out potential accessibility gaps.

input type=reset

input type=submit

input type=image

Expected result: These test cases would pass checks for an allowed role, but other failures would be expected for the instances where the elements are not contained or owned by their expected accessibility parents, or where they lack other expected properties required by authors. Note: there is no need to use a role=button on one of these elements, so while it's use is not recommended due to unnecessary redundncy, it is also not likely to cause issues.

input type=reset

input type=submit

input type=image

Expected result: No errors would be expected for these test cases, as they meet all the necessary requirements for use of these roles (necessary nesting and required attributes). Conformance checkers could provide a warning or guidance to use a different HTML element as a base for these roles, if they so choose.