-
Notifications
You must be signed in to change notification settings - Fork 242
docs: Migrating accessibility guidelines for Expandable & Menu #3600
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
base: master
Are you sure you want to change the base?
docs: Migrating accessibility guidelines for Expandable & Menu #3600
Conversation
Note I removed the Selectable Menu example because it wasn't a keyboard accessible example.
Workday/canvas-kit
|
||||||||||||||||||||||||||||||||||||||||
| Project |
Workday/canvas-kit
|
| Branch Review |
william-docs-expandable-and-menu
|
| Run status |
|
| Run duration | 02m 33s |
| Commit |
|
| Committer | William Stanton |
| View all properties for this run ↗︎ | |
| Test results | |
|---|---|
|
|
0
|
|
|
1
|
|
|
86
|
|
|
0
|
|
|
843
|
| View all changes introduced in this branch ↗︎ | |
UI Coverage
19.34%
|
|
|---|---|
|
|
1533
|
|
|
365
|
Accessibility
99.31%
|
|
|---|---|
|
|
6 critical
5 serious
0 moderate
2 minor
|
|
|
77
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates accessibility documentation for the Expandable and Menu components from the design site into the Canvas repository, making accessibility a "first class citizen" in Canvas docs. The changes include comprehensive accessibility guidelines, keyboard navigation details, and screen reader experiences.
- Added detailed accessibility sections with WAI-ARIA pattern references for both components
- Updated Avatar examples to use the
isDecorativeprop for proper screen reader behavior - Enhanced HoistedModel example with semantic HTML and ARIA labeling best practices
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| modules/react/menu/stories/Menu.mdx | Added comprehensive accessibility section with navigation, screen reader experience, and contextual accessibility notes throughout examples |
| modules/react/menu/stories/examples/SelectableMenu.tsx | Moved role attribute from Menu.Card to Menu.List and added detailed JSDoc about accessibility limitations |
| modules/react/expandable/stories/Expandable.mdx | Added accessibility section with navigation, screen reader experience, and contextual notes for Avatar decoration and semantic sections |
| modules/react/expandable/stories/examples/Avatar.tsx | Added isDecorative prop to Avatar instances |
| modules/react/expandable/stories/examples/RTL.tsx | Added isDecorative prop to Avatar instances |
| modules/react/expandable/stories/examples/LongTitle.tsx | Added isDecorative prop to Avatar instance |
| modules/react/expandable/stories/examples/HoistedModel.tsx | Enhanced with semantic sections, ARIA labeling, and improved styling approach |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <Expandable> | ||
| <Expandable.Target headingLevel="h4"> | ||
| <Expandable.Avatar name="Avatar" url={testAvatar} /> | ||
| <Expandable.Avatar name="Avatar" isDecorative url={testAvatar} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to always define isDecorative on the expandable.avatar?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK! I did it!
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.
Expandable and Menu are the next set of components.
Release Category
Documentation
Checklist
ready for reviewhas been added to PRFor the Reviewer
Where Should the Reviewer Start?
modules/react/expandable/stories/Expandable.mdxmodules/react/menu/stories/Menu.mdxI also updated the examples using the new Avatar component and the
isDecorativeprop.Areas for Feedback? (optional)
Testing Manually
Screenshots or GIFs (if applicable)
Thank You Gif (optional)