Click targets of at least 44 px, and a test for targets and focus (#117) #145
+279
−8
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.
The README said that all click targets are at least 44 × 44 px and that everything shows focus. Focus was fine, but about 15 kinds of links and buttons were smaller: 18 to 41 px tall. Examples are «Utforsk alle viner» and «Nettsiden til …» on the wine page, «Logg inn for å gi din dom», «Lag bruker» under the login form, the «Se …» links and «Tilbake til Min side» on Min side, «Nullstill filtre», and the links on the 404 and no-hits pages.
What changed
New test
frontend/e2e/targets.spec.tsgoes through search, filters (sidebar and the dialog on mobile), the wine page, the account page, Min side, a list and the 404 page, logged out and logged in, on desktop and mobile. It fails if a click target is smaller than 44 × 44 px (apart from the exceptions above), or if Tab reaches an element without a visible focus mark. The fake API ine2e/support/fakeApi.tsnow answers the filter options, so the filter panel is covered too.Testing
npm run check -- --e2epasses. The new test fails without the CSS changes, and it fails when the focus outline is removed from the links. I also measured every link and button on 36 page states with the full dataset locally, and found no other targets under 44 px.Closes #117