Skip to content

docs(expandable): Expand accessibility guidance for AI codegen - #4174

Open
williamjstanton wants to merge 3 commits into
Workday:masterfrom
williamjstanton:william-aidocs-expandable
Open

williamjstanton wants to merge 3 commits into
Workday:masterfrom
williamjstanton:william-aidocs-expandable

Conversation

@williamjstanton

@williamjstanton williamjstanton commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

Expands Expandable Storybook docs so AI codegen (and humans) can compose an accessible disclosure or accordion without duplicating built-in ARIA.

The Accessibility section now matches the Dialog / FormField / Checkbox pattern: minimum structure aligned to Basic Example, built-in aria-expanded / aria-controls / display: none behavior, a three-way composition choice (single disclosure, accordion via Hoisted Model, navigation list), heading-level prompts, a requirements table, and anti-patterns. Usage no longer restates those a11y rules; the first example is titled Basic Example.

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
  • Breaking Changes provides useful information to upgrade to this code or removed if not applicable

Where Should the Reviewer Start?

modules/react/expandable/stories/Expandable.mdxAccessibility, then Usage (Basic Example, Avatar, Hoisted Model).

Areas for Feedback? (optional)

  • Documentation

Testing Manually

  1. yarn start and open Components / Containers / Expandable.
  2. Confirm Basic Example is first, Avatar/Hoisted Model have no duplicate a11y callouts, and Accessibility sections render (minimum structure, built-in behaviors, requirements table, anti-patterns).
  3. Follow in-page links: Basic Example, Hoisted Model, Side Panel with Navigation, APG disclosure/accordion.

Screenshots or GIFs (if applicable)

N/A — documentation only. No component API or visual change.

Summary by CodeRabbit

  • Documentation
    • Reorganized the Expandable examples and renamed the “Start Icon” example to “Basic Example.”
    • Reworked the accessibility guidance with clearer sections covering disclosure widgets, minimum accessible structure, built-in keyboard and ARIA behaviors, requirements, and common anti-patterns.
    • Added guidance on choosing heading levels and cross-referenced accessibility requirements from the Hoisted Model section.

William Stanton and others added 3 commits September 17, 2026 15:50
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@williamjstanton
williamjstanton requested a review from a team as a code owner September 18, 2026 13:03
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 2b23ed04-08ba-420c-bbcd-5352eb3434ba

📥 Commits

Reviewing files that changed from the base of the PR and between 8743b8d and 6961f10.

📒 Files selected for processing (1)
  • modules/react/expandable/stories/Expandable.mdx

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The Expandable story reorganizes examples and replaces narrative accessibility guidance with structured sections covering built-in behavior, composition requirements, and anti-patterns.

Changes

Expandable documentation

Layer / File(s) Summary
Examples and model guidance
modules/react/expandable/stories/Expandable.mdx
Imports are reordered. The “Start Icon” example is renamed “Basic Example”. Accessibility notes and Hoisted Model guidance are updated.
Built-in accessibility behavior
modules/react/expandable/stories/Expandable.mdx
The Accessibility section adds a minimum structure example and documents ARIA, DOM, keyboard, and screen-reader behavior.
Requirements and anti-patterns
modules/react/expandable/stories/Expandable.mdx
New guidance distinguishes disclosure compositions, lists conditional requirements, and identifies patterns that code generation must not use.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Other

Suggested reviewers: sheelah, josh-bagwell

Merge Risk: ⚪ Minimal · up to 6961f

The accessibility documentation update is ready to merge.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: expanding Expandable accessibility documentation for AI code generation.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Create a new PR

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 Sep 18, 2026
@williamjstanton williamjstanton changed the title docs(expandable): expand accessibility guidance for AI codegen docs(expandable): Expand accessibility guidance for AI codegen Sep 18, 2026
@cypress

cypress Bot commented Sep 18, 2026

Copy link
Copy Markdown

Workday/canvas-kit    Run #11628

Run Properties:  status check passed Passed #11628  •  git commit 75f3eca535 ℹ️: Merge 6961f108402d05d524197d00ca615a715bb100d9 into 8743b8d9f111efb6d11b7a8e2c5d...
Project Workday/canvas-kit
Branch Review william-aidocs-expandable
Run status status check passed Passed #11628
Run duration 02m 37s
Commit git commit 75f3eca535 ℹ️: Merge 6961f108402d05d524197d00ca615a715bb100d9 into 8743b8d9f111efb6d11b7a8e2c5d...
Committer William Stanton
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 830
View all changes introduced in this branch ↗︎
UI Coverage  19.8%
  Untested elements 1537  
  Tested elements 377  
Accessibility  99.06%
  Failed rules  5 critical   5 serious   3 moderate   2 minor
  Failed elements 76  

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.

1 participant