Skip to content

Inconsistent allowed roles for "button" elements #395

@scottaohara

Description

@scottaohara

This issue was filed while creating the PR to address #375.

input type=image is a graphical version of input type=submit.

The latter, along with input type=reset does not allow for any role.

The former, along with the button element and input type=button allow for specific roles.

A button element defaults to type=submit if the type attribute is missing. The spec does not distinguish the different button types though.

Right now the spec is inconsistent with when these rules apply, so I propose the following:

Make input type=submit, input type=reset, input type=button, input type=image, and button all have the same allowances if not a descendant of a <form> or associated with a <form>. Otherwise, surface a warning that authors SHOULD use type=button or ensure that the implicit submit/reset functionality of the control has been suppressed.

cc @stevefaulkner, @patrickhlauke

Metadata

Metadata

Assignees

Labels

Allowed rolesPertaining to the allowed roles of HTML elementsClarification neededRevise or expand the information providedInconsistencyInconsistency in allowances between similar HTML/ARIA features.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions