Skip to content

Conversation

siverne
Copy link
Member

@siverne siverne commented Nov 26, 2026

Closes #124

What

  • The search field on the landing page: on focus, its border turned wine red, which showed against the white field (8.6:1) but hardly against the wine-red background (1.3:1). A light ring outside the border now shows against the background: at least 6.5:1 in light mode and 7.9:1 in dark mode. The ring comes from a CSS variable that only the hero sets, so the search field on other pages looks the same as before. 30 search suggestions #150 reuses the same field styles, so the ring also works with the new suggestions field.
  • «Hopp til resultatene» on /sok, right after the h1. Like «Hopp til hovedinnhold», it is hidden until it gets focus. Enter moves focus past the search field and all the filters to «Viser 24 av … viner», which a screen reader reads, and the next Tab goes to the sorting and then the wines. The link does not put #results in the URL.
  • README: the accessibility list mentions both.
  • frontend/README.md gets the newline at the end that Remove leftovers, and make / a plain health check (#121) #149 left out (the same fix as in 30 search suggestions #150, so it merges cleanly).

Tests

  • New e2e test in search.spec.ts: Tab, Enter, Tab reaches the link, and Enter puts focus on the number of hits.
  • search.spec.ts and targets.spec.ts pass (20 tests). The link is 44 px tall and has a visible focus mark, so the target test from Click targets of at least 44 px, and a test for targets and focus (#117) #145 accepts it.
  • npm run check passes.
  • Checked by hand in the browser: the contrast of the ring measured in light and dark mode, and the link with the keyboard.

AI: With Claude, we found where the focus ring was too weak, measured the contrast and suggested the code. I made the changes and ran the tests.

@siverne siverne requested a review from a team as a code owner November 26, 2026 19:11
Copy link
Member

@oscarba oscarba left a comment

Choose a reason for hiding this comment

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

Tested and okay

@oscarba oscarba merged commit 5515e10 into main Nov 26, 2026
@oscarba oscarba deleted the 124-focus-and-skip-link branch November 26, 2026 19:55
Sign in to join this conversation on GitHub.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visible focus on the search field, and a skip link to the results
2 participants