docs: Migrating accessibility guidelines for FormFIeld, TextInput, TextArea#3615
Open
williamjstanton wants to merge 15 commits intoWorkday:masterfrom
Open
docs: Migrating accessibility guidelines for FormFIeld, TextInput, TextArea#3615williamjstanton wants to merge 15 commits intoWorkday:masterfrom
williamjstanton wants to merge 15 commits intoWorkday:masterfrom
Conversation
added 7 commits
November 19, 2025 15:13
Reducing redundancy in the Error & Caution docs. Making FormField the single source of truth.
Discovering we can't use 'as={InputGroup}' on 'FormField.Input' component because it breaks assumptions about which elements to apply input id value for the label.
Workday/canvas-kit
|
||||||||||||||||||||||||||||||||||||||||
| Project |
Workday/canvas-kit
|
| Branch Review |
william-docs-form-fields
|
| Run status |
|
| Run duration | 02m 25s |
| Commit |
|
| Committer | William Stanton |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
0
|
|
|
86
|
|
|
0
|
|
|
850
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
19.36%
|
|
|---|---|
|
|
1539
|
|
|
367
|
Accessibility
99.33%
|
|
|---|---|
|
|
6 critical
5 serious
0 moderate
2 minor
|
|
|
77
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates accessibility guidelines for FormField, TextInput, and TextArea components from the design site into the Canvas repository as technical documentation for developers. The changes consolidate error state examples into FormField, fix critical InputGroup label association issues, and add a new debounced AriaLiveRegion example for character count announcements.
- Reorganized error/caution state documentation to FormField with improved accessibility guidance and "Error:"/"Alert:" prefixes for colorblind users
- Fixed InputGroup label associations by using
useFormFieldModeland hoisting input IDs for proper ARIA labeling - Added comprehensive accessibility sections covering autocomplete, mobile keyboards, screen reader experiences, label associations, and character limit best practices
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| modules/react/text-input/stories/examples/Icons.tsx | Fixed InputGroup label association by hoisting FormField input ID and rendering InputGroup on FormField.Field |
| modules/react/text-input/stories/examples/Error.tsx | Removed - consolidated into FormField error state documentation |
| modules/react/text-input/stories/examples/Caution.tsx | Removed - consolidated into FormField caution state documentation |
| modules/react/text-input/stories/TextInput.stories.ts | Removed Caution and Error story exports |
| modules/react/text-input/stories/TextInput.mdx | Added comprehensive accessibility section with autocomplete, input types, placeholders, and screen reader guidance |
| modules/react/text-area/stories/examples/Error.tsx | Removed - consolidated into FormField error state documentation |
| modules/react/text-area/stories/examples/Caution.tsx | Removed - consolidated into FormField caution state documentation |
| modules/react/text-area/stories/TextArea.stories.ts | Removed Caution and Error story exports |
| modules/react/text-area/stories/TextArea.mdx | Added accessibility section with character limits, resize constraints, and screen reader guidance |
| modules/react/form-field/stories/examples/HiddenLabel.tsx | Fixed InputGroup label association using same pattern as Icons.tsx |
| modules/react/form-field/stories/examples/GroupedInputs.tsx | Added "Error:" prefix to error messages for colorblind users |
| modules/react/form-field/stories/examples/Error.tsx | Added "Error:" prefix to hint text for better accessibility |
| modules/react/form-field/stories/examples/Caution.tsx | Updated example with "Alert:" prefix and better password strength messaging |
| modules/react/form-field/stories/FormField.mdx | Reorganized accessibility section, added guidance on error prefixes, disabled fields, required fields, and label best practices |
| modules/docs/mdx/accessibility/examples/AriaLiveRegions/CommentBoxWithCharLimit.tsx | New example demonstrating debounced live region announcements for character limits |
| modules/docs/mdx/accessibility/TestingTableWithFormFields.mdx | New documentation for testing tables with form field components |
| modules/docs/mdx/accessibility/AriaLiveRegions.mdx | Replaced TextInputWithLiveError example with debounced character limit example |
| cypress/component/TextInput.spec.tsx | Removed Caution and Error test cases, simplified to test only Basic example |
| cypress/component/TextArea.spec.tsx | Removed Caution and Error test cases, simplified to test only Basic example |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
modules/docs/mdx/accessibility/examples/AriaLiveRegions/CommentBoxWithCharLimit.tsx
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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
As part of making accessibility a first class citizen in Canvas docs, we will be pulling any technical information for developers off of the design site, and into the Canvas repository.
FormField, TextInput, and TextArea are my next focus.
Release Category
Documentation
Checklist
ready for reviewhas been added to PRFor the Reviewer
Where Should the Reviewer Start?
modules/react/form-field/stories/FormField.mdxmodules/react/text-input/stories/TextInput.mdxmodules/react/text-area/stories/TextArea.mdxImportant notes about using
InputGroup:modules/react/text-input/stories/examples/Icons.tsxmodules/react/form-field/stories/examples/HiddenLabel.tsxA really cool new example debouncing an AriaLiveRegion:
modules/docs/mdx/accessibility/AriaLiveRegions.mdxmodules/docs/mdx/accessibility/examples/AriaLiveRegions/CommentBoxWithCharLimit.tsxAreas for Feedback? (optional)
Testing Manually
Screenshots or GIFs (if applicable)
For the InputGroup examples, make sure the text input fields are properly associated to their label elements. (Previously, the
idattribute values were incorrectly being set on theInputGroupcontainer element.)Thank You Gif (optional)