Skip to content

[preview-card] Clarify accessibility guidance - #5591

Open
jjenzz wants to merge 8 commits into
mui:masterfrom
jjenzz:codex/preview-card-a11y-docs
Open

[preview-card] Clarify accessibility guidance#5591
jjenzz wants to merge 8 commits into
mui:masterfrom
jjenzz:codex/preview-card-a11y-docs

Conversation

@jjenzz

@jjenzz jjenzz commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Reframe the Preview Card description around uninterrupted keyboard and screen reader navigation.
  • Explain why preview content should remain supplementary and the link destination should remain the accessible interface.
  • Explicitly avoid describing Preview Card as inaccessible or not accessible. The link is accessible; its preview content is intentionally not keyboard or screen reader navigable and acts as a visual enhancement for sighted users only.
  • Sync the generated component overview description.

Related to #5583. This PR improves how the current Preview Card behavior is framed in the documentation. It does not add keyboard or screen reader navigation to the preview content and is not intended as the solution to #5583.

@jjenzz jjenzz added docs Improvements or additions to the documentation. component: preview card Changes related to the preview card component. labels Aug 28, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 28, 2026

Copy link
Copy Markdown

commit: 685843b

@code-infra-dashboard

code-infra-dashboard Bot commented Aug 28, 2026

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 0B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,247.16 ms -90.82 ms(-6.8%) | Renders: 76 (+0) | Paint: 2,036.84 ms -114.28 ms(-5.3%)

Test Duration Renders
Popover mount (300 instances) 40.69 ms ▼-13.87 ms(-25.4%) 1 (+0)

14 tests within noise — details


Check out the code infra dashboard for more information about this PR.

@netlify

netlify Bot commented Aug 28, 2026

Copy link
Copy Markdown

Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 685843b
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a9172db1864a50008e8c56f
😎 Deploy Preview https://deploy-preview-5591--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@aarongarciah aarongarciah left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sharing Claude's automated review. It has a good point about being more specific about which interactions trigger the preview.

PR review

Docs-only change; no runtime or API surface touched. The new descriptions were verified against the implementation and are accurate: the trigger renders an <a>, the popup opens on focus/hover without moving focus, carries no ARIA role or reference, and its content is unreachable by keyboard or screen readers. Nothing merge-blocking; one small information loss from the old prose.

Docs (1)

1. 🟡 Touch-user caveat dropped from usage guidelines

Location: docs/src/app/(docs)/react/components/preview-card/page.mdx:23

- **Keep popup content supplementary**: ... preview card content is not keyboard or
  screen reader navigable and acts as a visual enhancement for sighted users only.

The old text explicitly said previews are "not accessible to touch or screen reader users." The replacement says "sighted users only," which silently implies all sighted users see the preview — but the trigger's hover interaction is mouseOnly: true (PreviewCardTrigger.tsx:71), so sighted touch users never see it at all. That was worth stating and is now gone.

Failure scenario: A developer building a touch-first product reads the new guidelines, concludes the preview reaches all sighted users, and puts weight on preview content that no mobile user will ever see.

Fix: Reinstate the touch caveat, e.g. "…acts as a visual enhancement for sighted mouse and keyboard users only; it does not open on touch devices."

Verdict

Approve after nits — accurate reframing verified against the implementation, with one dropped touch-support caveat worth restoring.


🤖 Review generated with Claude Code

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

Labels

component: preview card Changes related to the preview card component. docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants