The menu can be read - #893
Merged
Merged
Conversation
The first accessibility pass over the customer pages, and it leaves behind
a ratchet rather than a one-off. Contrast is the thing that regresses
silently: a colour is always chosen by eye, and the eye choosing it is
looking at a good screen in a well-lit room.
ONE VALUE WAS WRONG. `#0f8a3d`, used for "ok" and for the veg marker on
both pages, is 4.45:1 on white against the 4.5:1 that AA asks of body text.
Close enough that nobody would notice by looking, and either side of a line
that is not a judgement call. It is #0e8038 now - 5.04:1, and the same
green to look at.
WHAT WAS ALREADY RIGHT, and I checked rather than assumed:
- every other text colour on both pages clears AA, in both themes
- the menu's dark palette is comfortable: nothing under 6.9:1
- the language attribute is set from the chosen language at load, and the
toggle RELOADS rather than swapping text in place, so it can never
disagree with the words on screen. I suspected this one and was wrong
- focus styles exist, reduced motion is honoured, images carry alt text,
buttons carry labels, and the sort radios are wrapped in their labels
rather than orphaned
The test checks its own arithmetic against known WCAG values, because a
contrast test with a wrong formula passes everything.
WHAT IS STILL MISSING, and is not a colour: /order has no dark mode at all
while /menu has one. A menu read across a dinner table in the evening is
the common case, and the ordering page is the one people spend longer on.
That wants somebody watching it render, not a ratio, so it is named here
rather than guessed at.
Contributor
|
Merged to Try it at https://develop.posnic.io, or run it yourself: git fetch origin develop && git checkout develop
npm install && npm --prefix api install
npm run dev # then http://localhost:3000When you have tested it, say what you did and what happened, and set Reporting that something is broken is as useful as fixing it. It is |
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.
The first accessibility pass over the customer pages. It leaves behind a ratchet rather than a one-off, because contrast is the thing that regresses silently: a colour is always chosen by eye, and the eye choosing it is looking at a good screen in a well-lit room.
One value was wrong
#0f8a3d, used for "ok" and for the veg marker on both pages, is 4.45:1 on white against the 4.5:1 that AA asks of body text.Close enough that nobody would notice by looking, and either side of a line that is not a judgement call. It is
#0e8038now - 5.04:1, and the same green to look at.What was already right, checked rather than assumed
lang="en"and switch to Tamil at runtime, which would have a screen reader read Tamil in an English voice. It turns outi18n.jsoverwrites it at load, and the toggle reloads rather than swapping text in place, so it can never disagree with the words on screen. I was wrong, and checking was the right callThe test checks its own arithmetic
A contrast test with a wrong formula passes everything, so it verifies itself against known WCAG values: black on white is 21:1, white on white is 1:1, and
#767676on white is the canonical 4.54:1.What is still missing, and is not a colour
/orderhas no dark mode at all while/menuhas one. A menu read across a dinner table in the evening is the common case, and the ordering page is the one people spend longer on.That is a real gap and I have not built it: adding a second theme to a five-thousand-line stylesheet wants somebody watching it render, not a ratio. Named here rather than guessed at.
Checks
frontend/publicbuilt, which CI does);check-locally.jsall 7 pass