fix(z-input): add aria-required to required checkboxes#627
Open
ada-workbackai wants to merge 1 commit intomasterfrom
Open
fix(z-input): add aria-required to required checkboxes#627ada-workbackai wants to merge 1 commit intomasterfrom
ada-workbackai wants to merge 1 commit intomasterfrom
Conversation
Ensures checkbox inputs programmatically indicate required status by adding aria-required="true" when the required prop is set. This improves accessibility for screen reader users who need to know which form fields are mandatory. Fixes WCAG 1.3.1 (Info and Relationships) violation where required checkboxes lacked programmatic indicators of their required status.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes WCAG 1.3.1 (Info and Relationships) by ensuring checkbox inputs programmatically indicate their required status through the
aria-requiredattribute.Issue: Required checkboxes in the registration form lack programmatic indicators of their required status. Screen reader users cannot determine which checkboxes are mandatory, forcing them to use trial-and-error to discover form requirements.
Solution: Modified the
z-inputcomponent to automatically addaria-required="true"when therequiredprop is set on checkbox inputs. This ensures both the HTML5requiredattribute and ARIAaria-requiredattribute are present for maximum accessibility compatibility.Changes
aria-required="true"to checkbox inputs whenrequiredprop is truearia-requiredis applied to required checkboxesTest Plan
requiredcheckbox witharia-requiredattributeImpact
This fix applies to all checkboxes rendered with
<z-input type="checkbox" required>across all applications using the design system, including:Evidence
View before/after screenshots and full audit details:
https://app.workback.ai/dashboard/issue/5054/
WCAG Reference:
1.3.1 Info and Relationships