[preview-card] Clarify accessibility guidance - #5591
Conversation
commit: |
Bundle size
PerformanceTotal duration: 1,247.16 ms -90.82 ms(-6.8%) | Renders: 76 (+0) | Paint: 2,036.84 ms -114.28 ms(-5.3%)
14 tests within noise — details Check out the code infra dashboard for more information about this PR. |
✅ Deploy Preview for base-ui ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
aarongarciah
left a comment
There was a problem hiding this comment.
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
Summary
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.