Skip to content

docs(checkbox): Update accessibility docs and fix code examples - #4157

Closed
moaan-workday wants to merge 42 commits into
Workday:masterfrom
moaan-workday:checkbox-mdx-accessibility
Closed

docs(checkbox): Update accessibility docs and fix code examples#4157
moaan-workday wants to merge 42 commits into
Workday:masterfrom
moaan-workday:checkbox-mdx-accessibility

Conversation

@moaan-workday

Copy link
Copy Markdown
Contributor

Summary

This PR adds accessibility documentation for the Checkbox component and fixes accessibility errors in the code examples.

Key updates:

  • Added accessibility guidance for Checkbox.
  • Improved the code examples so that the correct accessible name is used--the adjacent checkbox label, not the group name.

Motivation

To ensure consumers of Canvas Kit have accurate accessibility guidance and accessible code examples when implementing the Checkbox component.

Release Category

Documentation

Checklist

For the Reviewer

  • PR title is short and descriptive
  • PR summary describes the change (Fixes/Resolves linked correctly)
  • PR Release Notes describes additional information useful to call out in a release message or removed if not applicable

Areas for Feedback? (optional)

  • Code
  • Documentation
  • Testing
  • Codemods

Testing Manually

  1. Run yarn start to launch Storybook locally.
  2. Navigate to the Checkbox component documentation.
  3. Verify that the accessibility section renders properly and code examples execute without errors.

William Stanton and others added 30 commits May 29, 2026 14:55
Replace narrative accessibility guidance with an MCP-oriented structure
(minimum structure, model config, requirements, anti-patterns) so agents
can implement accessible Dialogs without duplicating built-in behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Consolidate model config and custom targets into Accessibility Requirements,
add focus-management defaults with developer prompts, and dedupe overlapping
guidance so codegen tools get a clearer happy path and conditional overrides.

Co-authored-by: Cursor <cursoragent@cursor.com>
Add conditional-path snippets, codegen summary, and default-focus guidance while preserving the existing requirements structure; align the minimum accessible example with the Basic story layout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Restructure the accessibility section with built-in behaviors, DOM examples, developer requirements, and anti-patterns so assistive technology wiring is clearer for form fields and grouped controls.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align FormField accessibility docs with the Dialog pattern: add minimum structure, do-not-duplicate guardrails, keyboard/screen reader expectations, codegen-friendly requirements table, and fix FormFieldGroup usage to match role="group" implementation.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ormField

docs: Update FormField accessibility section
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…ialog

docs(Dialog): Add accessibility guidance for AI codegen
Restructure Menu accessibility docs to match the Dialog/FormField pattern with minimum structure, built-in behaviors, requirements, and anti-patterns for codegen.

Co-authored-by: Cursor <cursoragent@cursor.com>
Simplify minimum structure, remove programmatic open without Menu.Target, clarify custom target guidance, and document that mode="multiple" is not accessible with Menu.Item.

Co-authored-by: Cursor <cursoragent@cursor.com>
docs(menu): expand accessibility guidance for AI codegen
Co-authored-by: Cursor <cursoragent@cursor.com>
Clarify programmatic focus, lean keyboard and anti-patterns, and defer
shared FormField DOM and anti-pattern guidance to FormField docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
…reformat' into pr/4058

Resolve TextArea.mdx conflicts by keeping the FormField DOM pointer and
lean anti-patterns, restoring character-limit guidance, and combining the
slimmed requirements table with programmatic focus and resize rows.

Co-authored-by: Cursor <cursoragent@cursor.com>
Align minimum-structure wording with Basic, slim the codegen summary to
match the requirements table, and drop duplicated character-limit prose.

Co-authored-by: Cursor <cursoragent@cursor.com>
…Behaviors

aria-describedby, placeholder, and error wiring are documented in FormField
accessibility and Anti-Patterns.

Co-authored-by: Cursor <cursoragent@cursor.com>
moaan-workday and others added 8 commits August 4, 2026 16:24
Resize is a CSS prop documented in Usage; not an accessibility requirement row.

Co-authored-by: Cursor <cursoragent@cursor.com>
The a11y/master merge kept both copies of the DialogStoriesMeta import, which Storybook's MDX parser rejects as a redeclaration.

Co-authored-by: Cursor <cursoragent@cursor.com>
…ccessible name

FormField.Input sets aria-labelledby and overrode Checkbox's own label. FormFieldGroup.Input does not, so the visible "I agree to the terms" remains the accessible name and "Confirm" is group context.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@williamjstanton williamjstanton added accessibility documentation Affects documentation ready for review Code is ready for review labels Aug 28, 2026
@cypress

cypress Bot commented Aug 28, 2026

Copy link
Copy Markdown

Workday/canvas-kit    Run #11573

Run Properties:  status check passed Passed #11573  •  git commit ec410ecd27 ℹ️: Merge 81f1798d6a5a58eba6569c00ba6c1857b7fae62f into aa031c7ba442f83631b1eea0c4ad...
Project Workday/canvas-kit
Branch Review checkbox-mdx-accessibility
Run status status check passed Passed #11573
Run duration 02m 28s
Commit git commit ec410ecd27 ℹ️: Merge 81f1798d6a5a58eba6569c00ba6c1857b7fae62f into aa031c7ba442f83631b1eea0c4ad...
Committer moaan-workday
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 17
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 827
View all changes introduced in this branch ↗︎
UI Coverage  19.69%
  Untested elements 1540  
  Tested elements 375  
Accessibility  99.47%
  Failed rules  5 critical   5 serious   0 moderate   2 minor
  Failed elements 72  

@williamjstanton williamjstanton changed the title docs(checkbox): update accessibility docs and fix code examples docs(checkbox): Update accessibility docs and fix code examples Aug 28, 2026
@williamjstanton

Copy link
Copy Markdown
Collaborator

This one was branched off of a11y so let's hang on until this one goes in: #4156

@moaan-workday

Copy link
Copy Markdown
Contributor Author

Continuing work on new PR: #4164

1 similar comment
@moaan-workday

Copy link
Copy Markdown
Contributor Author

Continuing work on new PR: #4164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

accessibility documentation Affects documentation ready for review Code is ready for review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants