SIA-R8Form fields have an accessible name
Accessibility requirements
This rule tests conformance of the following accessibility requirements:
Description
This rule checks that form fields have an accessible name.
Applicability
This rule applies to every element in the HTML namespace where the element is included in the accessibility tree and has a semantic role of checkbox
, combobox
, listbox
, menuitemcheckbox
, menuitemradio
, radio
, searchbox
, slider
, spinbutton
, switch
, or textbox
. This corresponds to the roles that inherit from the abstract input
or select
roles and do not have a required context role that itself inherits from the input
or select
roles.
Expectations
- The element has an accessible name that is not empty.
Assumptions
This rule makes no assumptions.
Accessibility support
This rule has no known accessibility support concerns.
Examples
Passed
This element has an accessible name that is not empty and therefore passes the rule:
<label for="name">Name</label> <input id="name" type="text" />
Failed
This element has no accessible name and therefore fails the rule:
<input type="text" />
Inapplicable
This element is not included in the accessibility tree and is therefore inapplicable:
<input type="text" hidden />
Acknowledgments
This document includes material copied from or derived from https://www.w3.org/WAI/standards-guidelines/act/rules/e086e5/. Copyright © 2024 W3C® (MIT, ERCIM, Keio, Beihang).