Repository navigation
Conversation
…0 more languages #840 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Review of #1019 (localised generic link text). The design is sound: whole-text matching, English always checked, and conventional labels win. The tests are thorough. I read the diff and spot-checked the helpers. I did not run the test suite.
|
…document lang scope #840 Signed-off-by: Nik Cubrilovic <[email protected]>
|
Reviewed the diff; I didn't run the tests or CI.
Tests cover both rules, region subtags, no or unknown |
nc9
added a commit
that referenced
this pull request
Oct 22, 2026
…nt, skip reasons, link phrases (#1034) Batch of six reviewed PRs landed through one branch and one CI run: - #1032 Bun 1.4.4 pin (CA blocklist for the eight compromised eMudhra intermediates, NSS 3.131.1 roots) - #1030 nested CSS evidence for the style reader (repro from #1014 by @dbdefault) - #1025 page-intrinsic skips use a not-applicable reason so priors resolve - #1019 generic link phrases in ten more languages for link-text and anchor-text - #1021 content/word-count skips noindex pages - #1023 retirement of abandoned crawls uses the crawl lease Plus a test fix for the residency probe on Bun 1.4.4 linux-x64. Closes #840 Closes #946 Closes #1011 Closes #1013 Refs #841 Signed-off-by: Nik Cubrilovic <[email protected]>
Contributor
Author
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 #840
a11y/link-textandlinks/anchor-textnow recognise generic link text in the page language, chosen by the primary subtag of<html lang>, with English always checked.shared/generic-link-phrases.ts: lists for es, fr, de, pt, it, nl, ja, zh (simplified and traditional), ko, ru. Whole-text match after the same normalisation as the conventional labels (NFKC, case folding, edge and full-width punctuation removed); CJK is never split into words.lang(includingen) checks English only; one language's phrase is not applied on another language's page.anchor-textgains the guard too).anchor-textkeeps testing the link's text only, as before;link-textkeeps its accessible-name path.Tests:
generic-link-phrases-840.test.ts(52): per language a reported generic phrase and a non-reported descriptive link, for both rules; punctuation, case and region subtags; English on a non-English page; no/unknown lang; whole-text only; conventional labels in 13 language/label pairs; CJK no word split. Withanchor-text.test.tsand the 839 tests: 121 pass.tsgo --noEmitin packages/rules clean,tangly check --strictpasses.Docs: new "Generic phrases in other languages" section in
a11y/link-text, and a sentence inlinks/anchor-text; CHANGELOG bullet. Agent skill: no change needed.The phrase lists are conservative, my own picks per language (about 15 each), and open to native-speaker edits, especially ja, zh, ko and ru. Review trims: the ambiguous pager and wizard words (de
weiter, frsuite, ruпродолжить, italtro, nlverder) are left out; three-letter language codes (deu,fra,jpn...) map to their primary tag; only the primary<html lang>is read (a nestedlang, or other-language text on a page, is not detected), and the docs say so.