Does Info and Relationships require input fields to be surfaced programmatically when the accessible name does not make it clear that they are required? #4198
Replies: 1 comment 5 replies
-
The two passages do not contradict each other. According to WCAG SC 1.3.1, the required information must either be part of the Accessible Name (e.g. as an asterisk) or be transmitted programmatically (e.g. via required). If I do both (asterisk in the name and required attribute), this is not good because I can then perceive the information twice, e.g. with the screen reader, and therefore not efficiently. If I do neither (e.g. asterisk only visually on the page, but not via label element as part of the Accessible Name; no required attribute), this is a mistake because I can then perceive the asterisk with the screen reader when reading the content, for example, but not when I navigate directly to the field with the TAB key. |
Beta Was this translation helpful? Give feedback.
-
I have noticed that the understanding page for Label in Name seems to suggest that Info and Relationships calls for required fields to be represented programmatically (at least when the accessible name does not make it clear that the field is required), by using techniques like the 'required' or 'aria-required' attributes. Here is how it is written on the page:
I also noticed that the understanding page for Info and Relationships lists the following example:
Info and Relationships requires that Information, structure, and relationships conveyed through presentation can be programmatically determined or are available in text. It seems like the example on the Info and Relationships understanding page presents the information as text associated using an asterisk character in the field label but does not mention that the required state should be programmatically determinable. The example also does not appear to suggest that the required state is clear from the accessible names of the input field. The example listed on the Label in Name understanding page seems to suggest that including the text '(required)' in the label (but not the accessible name) is not sufficient to pass Info and Relationships on its own. Could someone please clarify this for me?
Beta Was this translation helpful? Give feedback.
All reactions