Repository navigation
Fix accessibility issues in documentation examples - #1529
Conversation
|
🟢 No design token changes found |
🟢 Bundle size report
|
🟢 No visual differences foundOur visual comparison tests did not find any differences in the UI. |
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the documentation accessibility updates.
No open issues 🎉
What changed in this PR
This PR improves accessibility in Primer Brand’s documentation examples without changing component implementations. It addresses contrast, narrow-screen layouts, video controls, and semantic markup, complementing the component-level fixes in #1522.
Changes:
- Improve text contrast and keep navigation and content within example previews.
- Adapt testimonial, tabs, and footer examples to narrow screens.
- Add accessible video playback controls, descriptive link text, and correct list markup.
| File | Description |
|---|---|
apps/next-docs/content/components/Testimonial/react.mdx |
Stack testimonials vertically on narrow screens. |
apps/next-docs/content/components/Tabs/index.mdx |
Constrain the custom-panel example to the preview width. |
apps/next-docs/content/components/River/react.mdx |
Use MinimalVideoPlayer with an accessible title and playback controls. |
apps/next-docs/content/components/Prose/index.mdx |
Provide descriptive link text and a relevant destination. |
apps/next-docs/content/components/PricingOptions/index.mdx |
Wrap the static example’s list item in FeatureList. |
apps/next-docs/content/components/MinimalFooter/index.mdx |
Size footer examples to fit their previews. |
apps/next-docs/content/components/BreakoutBanner/react.mdx |
Use a theme-aware background color for contrast. |
apps/next-docs/content/components/AnchorNav/index.mdx |
Contain inline navigation and set readable section text colors. |
Review effort: Balanced
Summary
Towards https://github.com/github/brand-experience/issues/828
Resolves:
Fixes accessibility issues in documentation examples.
List of notable changes:
AnchorNavandBreakoutBannerexamples.Tabs,Testimonial, andMinimalFooterexamples, and contained inlineAnchorNavnavigation.Rivervideo example to useMinimalVideoPlayerwith an accessible name and playback control.Proselink text and destinationPricingOptionscode example.What should reviewers focus on?
AnchorNavexamples stay within their previews, and theRivervideo can be paused with the keyboard.Steps to test:
AnchorNavsection text and theBreakoutBanneroptional background example in light and dark modes. Scroll theAnchorNavexamples and open their narrow menus.Tabscustom panels,Testimonialvariants and positioning examples, andMinimalFooterpreviews for clipped content.Rivervideo example, use the keyboard to play and pause the video. Check its accessible name with a screen reader.Proselink and thePricingOptionscustom tooltip-label code example'sPricingOptions.FeatureListwrapper.Supporting resources (related issues, external links, etc):
Testimonialreflow.Tabsreflow.Proselink.Rivervideo playback and accessibility.MinimalFooterpreview sizing; related component fixes are in Fix accessibility audit findings (1) #1522.PricingOptionslist semantics; this PR only updates the static code example.Contributor checklist:
update snapshotslabel to the PR)Reviewer checklist:
Screenshots:
Captured from the before and after environments at matching viewport sizes. Desktop screenshots are cropped to the affected example.
AnchorNavtext contrast — 1280px viewport, dark modeBreakoutBannerbackground contrast — 1280px viewport, dark modeTabscustom panels — 320px viewportTestimonialvariants — 320px viewportMinimalFooterlinks — 320px viewportRivervideo control — 1280px viewportProsedescriptive link — 1280px viewport