Repository navigation
A11Y-001: a link is not wrapped around a button - #1002
Merged
NewWorldVenture merged 1 commit intoOct 11, 2026
Merged
Conversation
Nine call sites rendered a Button as a Link's child: the 404, error and in-app not-found pages, the marketing AI page and shared CTA, and two vacations views. One action had two tab stops (measured on the 404 page: A, BUTTON, A, BUTTON), interactive content sat inside <a>, and the button covered its own link: axe's one serious public-page finding, a 9px target on the 404 page at 390 px in both themes. ButtonLink is a Next Link carrying Button's own classes; components/ui/ button.tsx is left as it is, and a test holds the copied classes equal to Button's. A guard refuses a link with a button child anywhere in app/ or components/, naming the one auth site left for its owner. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TRY21ZKsFrfB3qtoP972A4
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A11Y-001: from an axe sweep of every static public route, in both themes at 1280 and 390 px, run against current
main(209e5a4).The defect
Nine call sites rendered a
Buttonas the child of aLink:A button inside a link is one action with two controls:
main's 404 page in Chromium, Tab goes: A "Go to dashboard", BUTTON "Go to dashboard", A "Back to home", BUTTON "Back to home".<a>is invalid, and assistive technology announces a button inside a link.target-size, the one serious finding the public sweep found in either theme;/resources/benchmarksreturns that 404 until it is published).The fix
components/ui/button-link.tsx:ButtonLinkis a NextLinkcarrying Button's own classes (variant, size, focus ring, the 44 px coarse-pointer minimum). It is one control.components/ui/button.tsxexports none and I've left it as is. A test holds the copies equal to Button's.Left on purpose:
components/auth/join-invite.tsx(three sites on the invite screen). It's an auth surface, so I've left it for you. The guard test names it, so it can't be forgotten or multiply, and fixing it makes the test ask for the entry to be removed.Tests
tests/a-link-is-not-wrapped-around-a-button.test.tsapp/orcomponents/has a button as its child, across line breaks, except the one named file. Onmainit lists nine files.ButtonLinkrenders a single<a>with no<button>, and with Button's focus ring.ButtonLink's variants, sizes and base classes equal Button's, read from both sources.maina buttoncount 2maintoo) / 0 / cleanOn the same
mainbuild, the signed-in app in the dark theme at 390 px (246 routes, empty household) has 0 serious or critical axe findings. The light theme's remaining items are in #998, #1000 and #1001.No migration, configuration or dependency change.
🤖 Generated with Claude Code
https://claude.ai/code/session_01TRY21ZKsFrfB3qtoP972A4
Generated by Claude Code