Refuse a produced page that declares a language the site does not publish in - #187
Merged
iderex merged 1 commit intoAug 23, 2026
Conversation
…lish in [#186] The row read whether the lang attribute was there and held anything, so a page announcing a language this site does not publish in walked through it. That is the sharper of the two failures: a page declaring nothing leaves a screen reader guessing, and a page declaring the wrong language stops it guessing and sends it to the wrong answer with nothing to signal that. What the site publishes in is now declared once, in the invariant table, with the record it was taken from cited beside it. The comparison is on the primary subtag and folds case, so en-GB and EN pass, which is the record's own reading. The guard was proved by deleting the new arm and running the suite, which reddened the three cases written for it and left the neighbour green. Signed-off-by: Nils Lehnen <30603423+iderex@users.noreply.github.com>
iderex
deleted the
tests/a-page-declaring-a-language-the-site-does-not-publish-in
branch
August 23, 2026 15:31
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.
Closes #186.
What was wrong
page-declares-its-languageread whether thelangattribute was there andwhether it held anything, and nothing else:
So a produced page announcing a language this site does not publish in walked
through the row. With the value put in front of it through the template, which
is where a page property is actually lost, at
origin/main8a45538:Run 2026-08-23.
A correction to the evidence in the issue, because it matters to whoever
reproduces this. The demonstration there edits
dist/index.htmlafter a buildand then runs the verb.
Runbuilds into a directory it throws away and readsthat, rather than whatever is sitting in the output directory, so the edited
file is not what the row read and the
okit printed would have appeared forany value at all:
Run 2026-08-23. The gap the issue names is real and is what line 294 above says
it is. Only the route the issue took to show it does not reach the row.
Why the value matters and not only the attribute is the reader's cost. A page
that declares nothing leaves a screen reader guessing at a voice and a
pronunciation dictionary. A page that declares the wrong language stops it
guessing and sends it to the wrong answer, with nothing on the page saying so.
What this change does
The row now refuses a third thing, and what the site publishes in is declared
once in the table:
The value is taken from
decisions/site-language.mdinFlowfin/hub, which iscited at the declaration:
Run 2026-08-23.
The comparison is on the primary subtag and folds case, so
en-GBandENpass. That reading is the record's own, one paragraph further down: refusing a
tag that is more specific about the same language would push whoever writes the
next page towards the least specific tag available, which is the wrong direction
for a rule that exists so a reader's software picks the right voice.
It is a set rather than a single value, so a second published language later is
a change to what it holds rather than to the row that reads it.
The cost, stated rather than hidden. This is a second copy of an answer recorded
in another tree and nothing compares the two, because no leg of the gate reaches
the network. The day the record moves is a day this line is wrong and no run
says so. That is written at the declaration so the next reader meets it there.
The near miss
The template declaring a language the site does not publish in, at
c615810:Run 2026-08-23. The template was restored afterwards and is unchanged in this
branch:
That the guard bites, for the reason it names
The new arm was deleted and the suite run. Three cases went red and named the
value that walked through:
The neighbour stayed green through that deletion, which is what says the three
above move on the arm rather than on the fixture. The arm was restored and the
suite passes:
Four cases are added. One refuses
deand requires the message to carry thevalue and to say what the site publishes in. One walks the declared set and
leaves the tag itself, a region of it, and the tag in capitals alone, spelled
out of the set rather than typed, so a set that later grows does not leave a
case passing against a language nobody publishes in. One requires the
depageto red this row and no other, and then requires the same page carrying the
published tag to move nothing in either direction. One puts the value in the
template and reads the whole run, which is where both produced pages are named
rather than the one somebody happened to open.
What this does not reach
Whether the words on a page are in the language it declares is a judgement no
reading of the bytes makes. This refuses a wrong declaration and never a wrong
page, and a page whose prose drifted into another language while the attribute
stayed correct is refused by nothing here.
docs/near-miss.mdquotes the row's earlierit refusesandbecauselinesinside a transcript of run 31316531489 at
ccb2d5e. That transcript is a recordof what that run printed and is left as it stands, so the wording there no
longer matches the wording the row prints today. Nothing in this tree reads that
file:
Run 2026-08-23 at
c615810.Means
Go, in the package that already holds the table, because the rule is one row
beside thirty-seven others and the suite that proves a row bites already exists
there. Anything else would be a second apparatus for one comparison.
The gate
Run at
c615810, the commit this branch pushes:No second reader
Nobody but me has read this change. The evidence above stands in place of a
second reader rather than alongside one: the deletion that reddens the cases,
the run over the whole tree with the value in the template, and the gate at the
commit being pushed.