w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.14k stars 257 forks source link

Technique ARIA21 aria-invalid for required fields that have no input vs ARIA aria-invalid spec #3933

Closed LaurenceRLewis closed 5 months ago

LaurenceRLewis commented 5 months ago

I'd like to understand if Example 1 in the Technique ARIA21 Using aria-invalid to Indicate An Error Field meets with the wording in the ARIA 1.2 Specification for aria-invalid.

Specifically from Example 1 The aria-invalid attribute is used on required fields that have no input.

From ARIA 1.2 aria-invalid state Indicates the entered value does not conform to the format expected by the application. and If the value is computed to be invalid or out-of-range

Is the aria-invalid attribute correctly used in the scenario where required fields have no input and the form is submitted, or is it relevant only to when data is entered into the field, and that data is invalid.

scottaohara commented 5 months ago

it is used correctly.

if a form is submitted where the application expects the user to have entered data, but the user did not do so, then the lack of data (empty values) are not meeting the format expected by the application.