Add tests for hover/focus parity on the primary button - #225
Merged
Baskarayelu merged 1 commit intoAug 28, 2026
Merged
Conversation
app/globals.css only styled .btn:hover -- a keyboard user tabbing to the primary CTA got no visible affordance at all, while a mouse user hovering it did. Add a matching .btn:focus-visible rule (same lift transform, plus a visible outline since a transform alone isn't sufficient feedback for a11y) and Playwright tests asserting hover and focus produce the same computed transform, and that focus shows a visible outline.
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.
Summary
`app/globals.css`'s `.btn` only styled `:hover` (a lift transform). A keyboard user tabbing to the primary CTA ("Browse invoices" on the landing page) got no visible affordance beyond the browser's own default outline, while a mouse user hovering the same button saw the lift -- no parity between the two interaction modes.
Change
Note: could not execute the new e2e test locally
This repo's Playwright suite boots via `npm run build && npm run start`, and the production build currently fails on `main` for an unrelated, pre-existing reason: `lib/phone.ts` imports `libphonenumber-js`, which is not declared in `package.json` at all (confirmed via `npx tsc --noEmit` on a clean `main` checkout, and via the Playwright `webServer` failing with `Cannot find module 'libphonenumber-js'`). This blocks every e2e test in the suite, not just this one -- I did not fix it here since it's unrelated to #115's scope; flagging it in case it isn't already tracked. `npx tsc --noEmit` / `npx eslint` on the files this PR actually touches: clean.
Related to #115