← v151/languagedetector-support-for-traditional-vs-simplified-chinese · conformance
critique · rev 5
v151/languagedetector-support-for-traditional-vs-simplified-chinese
rubric
| dimension | score | severity | evidence |
|---|---|---|---|
| factual-source-fidelity | 5/5 | major | Reclassified to Case A (MDN-covered) after independent review: a fresh MDN fetch shows a substantive LanguageDetector reference (interface/property/method inventory, create() and detect() examples showing detectedLanguage + confidence, Specifications, Browser compatibility). Per the fixed Case-A rule, the incremental zh absence does NOT permit a duplicate full local family — the two child pages and reference-contract.json were removed before publication. This stub links the canonical MDN page and records only the Chrome 151 output-value change with its exact source boundary: ChineseScriptClassifier (script-unique UnicodeSet counting, majority wins, tie/all-common default zh-Hans, undefined for non-Chinese input), pinned WPT detector.optional output tests, Blink's supported-code list, and the Translate path cited only with its boundary (legacy zh-CN/zh-TW — not this API's output). An earlier rev also mis-attributed the Translator.availability() best-fit example as this feature's semantics; that error and its correction are recorded in this critique's history. |
| milestone-mapping | 5/5 | info | Feature id 5138651886518272 appears in the v151 milestone listing under 'Enabled by default'; the single stub page sits at the slug derived from the listing name per the documented slug rule; its H1 is the listing name verbatim. |
| completeness | 5/5 | info | A single Case A stub page at the feature route, with no child routes and no reference-contract.json (both removed before publication after the Case A reclassification). The page has exactly three parts: the lede (eyebrow, H1, and a two-sentence summary of the output-value change), the 'documented on MDN' card linking the canonical MDN LanguageDetector reference, and a quick-reference table recording only the Chrome 151 increment: the output-value change, the classifier decision rule, the pinned WPT proof, migration, confidence boundary, the Translate-path boundary, Chrome status, compatibility, and links. Nothing here duplicates MDN's API reference. |
| explanation-quality | 5/5 | info | The stub separates three things inspectably: (1) MDN owns the general API reference (the card says so, with MDN's coverage and last-modified date); (2) the Chrome 151 increment is an output-value change — results that returned 'zh' may now return zh-Hans/zh-Hant from the input text's characters; (3) the migration is exact — === 'zh' may never be true, match the language arc with startsWith. The classifier boundary is stated only to the depth its source documents (script-unique UnicodeSet counting, majority wins, tie/all-common default zh-Hans, undefined for non-Chinese input); confidence is described as model-defined with no script-certainty claim. |
| examples | 5/5 | info | The stub contains no embedded iframe and no code snippets. Its only example-shaped content is the pinned WPT reference (Simplified/Traditional test sentences and their expected outputs, cited as a link in the table) and the one-line migration pattern (tag === 'zh' || tag.startsWith('zh-')) inside the table's migration row. |
| browser-compat-fallbacks | 5/5 | info | One interim compatibility row set in the quick-reference table, labelled as from ChromeStatus: Chrome 151; Edge not separately reported; Firefox Negative on the broader API with a linked rationale (mostly Translator and Language Detector together; no position requested for the Chinese-variant change); Safari No signal; web developers Strongly positive. The same row notes that BCD's api/LanguageDetector.json covers the general API at Chrome 138 with no zh-variant entries (checked 2026-07-26), and the BCD file is linked. Signals are attributed to the ChromeStatus API record, which is linked directly in the status row. |
| links-validity | 5/5 | info | Every named source on the page is a direct link, verified one by one: canonical MDN LanguageDetector page (in the card, the table's MDN row, and the source footer); ChromeStatus feature page and API record (status row + footer); chinese_script_classifier.cc AND .h (the .h carries the non-Chinese-input boundary, linked beside the .cc per review); pinned WPT detector.optional.https.window.js; language_detection_util.cc (with its boundary label); Blink language_detector.cc; crbug.com/519251262; BCD api/LanguageDetector.json; and the identity-matched showcase feature route (text link in the Interactive demo row — no iframe). Zero plain-text source labels; all external links use target=_blank rel=noopener. |
| accessibility | 5/5 | info | Single main and h1; sequential h1→h2 ('this feature is documented on MDN', 'the Chrome 151 change'); one quick-reference table with row headers (th scope=row); a wbr hint in the long H1. No iframe exists on the page. |
| responsive-ux | 5/5 | info | One route only. MCP matrix at 1280x800 and 390x844: document scrollWidth equals the viewport at both sizes; the H1 is contained (342px box at 390); the quick-reference table's overflow-wrap keeps long tokens inside. No pre blocks exist on this page. |
| showcase-demo-relationship | 5/5 | info | The showcase feature is referenced only as a text link in the quick-reference table's Interactive demo row (identity-matched to chromestatus id 5138651886518272). There is no embed and no forked platform assertion; the suite's cpsFeature.conformanceRoute is the feature-level route. |
modern-web-guidance consulted
- MDN redirect stub page with card linking canonical documentation responsive on mobile — Correct HTML semantics for the stub card and quick-reference table. (Applied: the .mdn-card house pattern from the accepted position-anchor stub (ea485fa); one quick-reference table with scoped row headers.)
- MDN redirect stub page with card linking canonical documentation responsive on mobile — Semantic structure and clear link purpose. (Applied: single h1, sequential h2 headings, descriptive card and table links.)
- responsive quick-reference table readable at 390px without horizontal page overflow — Contain wide content within its track; avoid min-content blowout. (Applied: overflow-wrap anywhere on table cells; H1 wbr hint; verified 390/390 by MCP.)
open questions
- Rev 4 (Case A reclassification): converted to an MDN redirect stub after the fresh substantive MDN check — child routes and contract removed before publication; the page keeps only the 151 output-value change, its classifier/WPT boundary, compatibility, and the strict-'zh' migration. If MDN later documents the zh-variant values directly, this stub's quick-reference can shrink further.
- Rev 2 (source-review correction): the Translator.availability() best-fit example was wrongly presented as this feature's semantics in rev 1 and is removed everywhere (pages, contract, suite — the best-fit assertion was deleted, not reworked). The contract now rests on the classifier source + pinned WPT output tests. detect() takes text; no requested-tag determinism is claimed anywhere.
- Local Chrome 154 (2026-10-08) exposes LanguageDetector, but availability() returns downloadable, not available. No model download was initiated; detection outputs for Simplified and Traditional remain unverified at runtime in this environment. Re-check on a build with the model installed.
- ChromeStatus links Mozilla standards-positions #1015 for a Negative stance on the broader API; its note says this mainly concerns Translator/Language Detector together, not a requested position on Chinese variants. This distinction is now in the compatibility row.
follow-up goals
- [medium · targeted-fix] When a Chrome 151+ build is available, verify detection output for Simplified and Traditional inputs (zh-Hans/zh-Hant returned, bare zh absent) and record the evidence.
- [low · targeted-fix] When BCD or MDN gains zh-variant coverage, replace the interim compat framing with repository-backed data and re-evaluate against the Case A stub policy.