Add accessibility documentation for Layout sidebar row_placement: :none#3911
Add accessibility documentation for Layout sidebar row_placement: :none#3911liuliu-dev wants to merge 2 commits intomainfrom
Conversation
|
|
There was a problem hiding this comment.
Pull request overview
This PR adds accessibility documentation to warn developers about potential WCAG 1.4.10 Reflow issues when using row_placement: :none on the Layout component's sidebar. The documentation clarifies that this setting hides the sidebar at narrow viewports, which could create accessibility problems if the sidebar contains essential content.
Changes:
- Added accessibility warning about
row_placement: :noneto the main Layout component documentation - Updated the
row_placementparameter description to include the same accessibility warning
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/components/primer/alpha/layout.rb | Added accessibility documentation in both the component-level accessibility section and the sidebar parameter description |
| static/info_arch.json | Updated the corresponding JSON metadata with the same accessibility documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "type": "Symbol", | ||
| "default": "N/A", | ||
| "description": "Sidebar placement when `Layout` is in row mode. One of `:end`, `:none`, or `:start`." | ||
| "description": "Sidebar placement when `Layout` is in row mode. One of `:end`, `:none`, or `:start`. **Note:** Using `:none` hides the sidebar at narrow viewports, which may cause WCAG 1.4.10 Reflow issues if the sidebar contains essential content." |
There was a problem hiding this comment.
The documentation text differs slightly between the two locations. In this file, it says "WCAG 1.4.10 Reflow issues" while in layout.rb it says "WCAG 1.4.10 Reflow failures". These should use consistent terminology. Consider using "failures" in both places to be more technically accurate.
| "description": "Sidebar placement when `Layout` is in row mode. One of `:end`, `:none`, or `:start`. **Note:** Using `:none` hides the sidebar at narrow viewports, which may cause WCAG 1.4.10 Reflow issues if the sidebar contains essential content." | |
| "description": "Sidebar placement when `Layout` is in row mode. One of `:end`, `:none`, or `:start`. **Note:** Using `:none` hides the sidebar at narrow viewports, which may cause WCAG 1.4.10 Reflow failures if the sidebar contains essential content." |
What are you trying to accomplish?
Adds accessibility documentation warning about using
row_placement: :noneon the Layout component's sidebar as requested in https://github.com/github/accessibility-audits/issues/14738#issuecomment-3824258460Screenshots
Integration
List the issues that this change affects.
Closes # (type the GitHub issue number after #)
Risk Assessment
What approach did you choose and why?
Anything you want to highlight for special attention from reviewers?
Accessibility
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.