Skip to content

fix(rules): links/anchor-mismatch false positives on translated stores #2092 - #2162

Merged
nc9 merged 2 commits into
mainfrom
boat/anchor-mismatch-2092
Nov 21, 2026
Merged

nc9 merged 2 commits into
mainfrom
boat/anchor-mismatch-2092

Conversation

@nc9

@nc9 nc9 commented Nov 20, 2026

Copy link
Copy Markdown
Contributor

Closes #2092.

  • Inflections: words of 5+ chars sharing a 5+ char prefix with short endings match (cykelsadlerne / cykelsadel), plus e-elision (sadler / sadel, and as the end of a compound). A bare prefix (online / onlineshop) and a long glued tail (freezerrepairs / freezers) do not count.
  • Trailing counts like (15) are stripped from anchor text before comparison.
  • A leading locale segment (/da-dk/, /en/) is dropped from the slug tokens, so only the target's title and H1 (already in that locale) carry the topic.
  • Header, footer and nav links stay excluded (isChrome); new test through parsePage.

Tests: new describe in packages/rules/tests/anchor-mismatch.test.ts covering the Danish and German samples, the regression (Gratis fragt still warns), and chrome. Full rules suite as CI runs it (scripts/test-suites.ts --run rules): 12513 pass, 0 fail. typecheck passes.

No docs change needed (rule behaviour only). The squirrelscan agent skill needs no change.

@nc9
nc9 marked this pull request as ready for review November 20, 2026 21:33
@nc9
nc9 merged commit e7b6e0b into main Nov 21, 2026
8 of 15 checks passed
@nc9
nc9 deleted the boat/anchor-mismatch-2092 branch November 21, 2026 00:43
nc9 added a commit that referenced this pull request Nov 21, 2026
* origin/main:
  fix(rules): links/anchor-mismatch false positives on translated stores #2092 (#2162)
  fix(rules): coded gap skips for input not fully checked, batch 2 rules #2134 (#2163)

Signed-off-by: Nik Cubrilovic <[email protected]>
nc9 added a commit that referenced this pull request Nov 21, 2026
* origin/main:
  fix(rules): links/anchor-mismatch false positives on translated stores #2092 (#2162)
  fix(rules): coded gap skips for input not fully checked, batch 2 rules #2134 (#2163)

Signed-off-by: Nik Cubrilovic <[email protected]>
nc9 added a commit that referenced this pull request Nov 21, 2026
* origin/main:
  test(install,audit-engine): run install-hardening and attestation cases concurrently, copy the canonical crawl DB in javascript-shipped #1839 (#2186)
  build(packages): typecheck the tests of crawler, report, utils, tech-detect, core-contracts, config, waf-detect, threat-intel #1859 (#2190)
  fix(cli): refuse a run whose config rule selection plus WCAG level leaves zero rules #2110 (#2156)
  fix(rules): links/anchor-mismatch false positives on translated stores #2092 (#2162)
  fix(rules): coded gap skips for input not fully checked, batch 2 rules #2134 (#2163)
  test(audit-engine): carriedCheckAsFailure keeps the continuation mark #2098 (#2166)
  fix(rules): correct zoom-disabled 1.4.4 wording, related criteria for wcagNone rules #2115 (#2174)
  refactor(cli): list bash completion flags one per line #2116 (#2175)
  feat(rules): waive a public Supabase table by bare name in security/supabase-rls #2103 (#2177)
  test(rules): every site rule emits a check on a clean site, with a shrinking baseline #1741 (#2179)
  feat(rules): report each 5xx page as its own crawl/server-errors finding #2130 (#2181)

Signed-off-by: Nik Cubrilovic <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

links/anchor-mismatch: false positives on translated stores (inflections, counts, nav chrome)

1 participant