i18n(a11y): clarify translator context for accessibility terminology - #17118
Open
AKnassa wants to merge 1 commit into
Open
i18n(a11y): clarify translator context for accessibility terminology#17118AKnassa wants to merge 1 commit into
AKnassa wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Several accessibility UIStrings carry translator descriptions that never
disambiguate "accessibility" (usability for people with disabilities) from
"availability". In languages where those are separate words, translators have
picked the wrong one: the Slovak locale renders the Accessibility category as
"Dostupnosť" (availability) rather than "Prístupnosť", and "accessible name" as
"dostupný názov" rather than "prístupný názov".
Some of the affected strings had no usable context at all, e.g.
/** Title of the Agent Accessibility group of audits. */
agentAccessibilityGroupTitle: 'Agent Accessibility',
Append a translator note to the 42 descriptions behind the terminology anchors:
the bare "Accessibility" label, and the terms of art "accessible name",
"accessibility tree" and "accessible text alternative". Each note glosses the
term, states that it does not mean "available", and closes with one canonical
instruction reused verbatim, following the convention already used in
core/audits/agentic/llms-txt.js.
No en-US message or placeholder changes; comments only.
Refs GoogleChrome#17113
AKnassa
force-pushed
the
i18n-a11y-translator-context
branch
from
July 9, 2026 01:14
aad8227 to
7a1d647
Compare
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
Issue #17113 reports that the Slovak locale systematically mistranslates accessibility terminology —
Dostupnosť("availability") wherePrístupnosť("accessibility") is meant, anddostupný názovwhereprístupný názov("accessible name") is meant.This PR does not edit
sk.json, and it is not a fix for #17113. It addresses the upstream cause: several of the affectedUIStringsgive translators no context to tell the two senses of "accessibility" apart. Some give none at all —A translator seeing that has no way to know whether "Accessibility" means usable by people with disabilities or reachable/up. In Slovak those are different words.
This appends a translator note to the 42 descriptions behind the terminology anchors: the bare
Accessibilitylabel, and the terms of artaccessible name,accessibility tree, andaccessible text alternative.Why not just fix
sk.json?shared/localization/locales/*.jsonare markedlinguist-generated=true(.gitattributes:2) and are replaced wholesale by the periodici18n: importcommits that carry translations out of Google's Translation Console (core/lib/i18n/README.md, "Translation done in the Google TC pipeline"). A hand-edit would pass CI and then be silently reverted on the next import. The@descriptioncomment is the only in-repo lever that reaches a translator.What this actually achieves — and what it doesn't
Per
core/lib/i18n/README.md, TC's message ID is a hash ofmessageandmeaning, andresolveMessageCollisions()copiesdescriptionintomeaningonly for colliding messages. Diffing the generateden-US.ctc.jsonbefore/after:meaningadded / removedmeaningvalues changedSo, plainly:
aria-meter-name,aria-progressbar-name,aria-tooltip-name,aria-treeitem-name× (title,failureTitle) — share a placeholdered message, so theirmeaningis their description. Editing it changes their TC ID. These will be re-sent for translation in all 46 locales. Per the README, fixed collisions "cost real money" — flagging that explicitly so you can weigh it. It is unavoidable if these strings are to gain context.meaning, so their TC IDs are unchanged and their existing translations are retained. They gain context for whenever a translator next looks at them.Consequently the strings at the heart of #17113 — the
Accessibilitycategory label and theAgent Accessibilitygroup title — are in the second group. Their current Slovak translations will not change as a result of this PR. Correcting those requires someone with Translation Console access to fix the Slovak term. I could not find any in-repo mechanism (glossary, term list, override map) that a community contributor could use instead; if one exists I'd be glad to use it.This PR is a prerequisite for getting the translation right, not the correction itself.
Scope
Glossed the ambiguous single-word labels and the coined ARIA terms. Deliberately left alone the ~11 remaining strings from the issue where "accessibility" appears in ordinary prose that already disambiguates it (
aria-roles.js,aria-required-children.js,aria-required-parent.js,aria-allowed-role.js,empty-heading.js,seo/link-text.js,webmcp-schema-validity.js, the three a11y category descriptions indefault-config.js, andhelpUseCaseSnapshot1). Happy to extend if you'd rather they were consistent.Each note closes with the same canonical sentence, reused verbatim, following the convention in
core/audits/agentic/llms-txt.js.Two pairs of strings must keep byte-identical descriptions or they flip from an allowed collision to a disallowed one and trip
checkKnownFixedCollisions:a11yCategoryTitle/categoryAccessibility(messageAccessibility), andagentAccessibilityGroupTitle/Descriptionacross both config files. Kept identical — and verified by fault injection: desyncing either pair makesyarn i18n:collect-stringsexit 1 with the expected collision-allowlist error (before any file is written), while a lone edit to one of the four legitimately-colliding ARIA descriptions still passes. Runtime lookup of edited keys viaformat.getFormatted()was also spot-checked inen-USandsk.Verification
* The 2 failures (
build-bundle-test.js,build-lightrider-bundles-test.js) fail identically on unmodifiedmainin a bare local checkout — esbuild cannot resolve the hostlighthousepackage fromnode_modules/lighthouse-plugin-soft-navigation(same four errors, byte-identical, both sides).yarn diff:flow-sample-jsonlikewise fails identically on unmodifiedmain(a Node-versionerrorStackframe absent from the committed baseline); its failing diff is byte-for-byte the same with and without this change.Every changed line in the diff is a single-line JSDoc comment (machine-checked: zero non-comment changed lines). Runtime lookup of edited keys via
format.getFormatted()verified inen-USandsk.Refs #17113. Thanks to @rraddatch for the very thorough report.