Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WCAG 3.3.2 A: Required fields not indicated (Issue 32) #361

Open
CJE001 opened this issue Sep 13, 2024 · 1 comment
Open

WCAG 3.3.2 A: Required fields not indicated (Issue 32) #361

CJE001 opened this issue Sep 13, 2024 · 1 comment
Labels
A11y Issue is related to accessibility Core CivicTheme Core CivicTheme issue Type: Defect Issue is a defect
Milestone

Comments

@CJE001
Copy link

CJE001 commented Sep 13, 2024

Summary

Via Vision Australia assessment: August 2024

Impact: medium

Note: DTA have a 90 day remediation period to address the identified issues within the audit, all issues must be resolved to obtain WCAG 2.2 certification for digital.gov.au

Steps to reproduce

Contact digital.gov.au beta | digital.gov.au (https://www.digital.gov.au/contact)

Observed outcome

The "Subject" and "Message" inputs of the contact form are required fields. While this information is available programmatically for assistive technologies, this information is not provided in text.

Picture12

Code used

<input type="text" value="test" class="ct-textfield ct-input__element ct-theme-light form-text required" #component_theme="light" data-drupal-selector="edit-subject" id="edit-subject" name="subject" size="60" maxlength="255" required="required" aria-required="true">
…
<textarea class="ct-textarea ct-input__element ct-theme-light ct-input--required required " rows="5" required="" #civictheme_theme="light" #component_theme="light" data-drupal-selector="edit-message" id="edit-message" name="message" cols="60" aria-required="true"></textarea>

Why this matters

When required fields are not specified, users may struggle to complete forms successfully. This can be especially problematic for users with cognitive or learning disabilities.

Expected outcome

Ensure that users are advised in text when a form contains required fields.

This can be achieved in a number of ways such as:

• Appending the text (required) to all <label> elements of required inputs
• Appending a symbol, such as an asterisk (*) to all <label> elements of required inputs, and explaining the meaning of this asterisk above the form
• Appending the text (optional) to all <label> elements of optional inputs, where all others are then required.

Code example

<div>
<label for="subject">
Subject (required)
</label>
</div>
<div>
<input type="text" value="…" id="subject" name="subject" required aria-invalid="false" aria-describedby="error-1">
</div>

Related issues

For other issues related to this component, please refer to:

• Issue 6 – Label not programmatically associated with input
• Issue 7 – Error messages not programmatically associated with input
• Issue 12 – Inputs missing autocomplete attribute
• Issue 20 – Form input borders have insufficient contrast
• Issue 37 – Success message not announced by screen readers

@CJE001 CJE001 added the Type: Defect Issue is a defect label Sep 13, 2024
@CJE001
Copy link
Author

CJE001 commented Sep 13, 2024

**Guideline 3.3: Input Assistance "Help users avoid and correct mistakes."

3.3.2 Labels or Instructions WCAG 2.0 Level A**

Labels or instructions are provided when content requires user input.
Users with a disability are more likely to make mistakes than others, and recovery from mistakes may be more difficult. Providing simple instructions and examples of expected data format help all users, and especially people with a disability, fill out forms correctly.

@github-project-automation github-project-automation bot moved this to Todo in UI Kit Sep 17, 2024
@fionamorrison23 fionamorrison23 self-assigned this Sep 17, 2024
@fionamorrison23 fionamorrison23 added the A11y Issue is related to accessibility label Sep 17, 2024
@jcloys jcloys added the Core CivicTheme Core CivicTheme issue label Oct 14, 2024
@fionamorrison23 fionamorrison23 removed their assignment Nov 21, 2024
@fionamorrison23 fionamorrison23 added this to the 1.10 milestone Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A11y Issue is related to accessibility Core CivicTheme Core CivicTheme issue Type: Defect Issue is a defect
Projects
Status: Todo
Development

No branches or pull requests

3 participants