Repository navigation
Description
A finding that sits in a shared page region (the site footer, header, navigation or a sidebar) is reported as a list of every page it was found on. The same "Sign in" link in the header of a 53-page site produces "49 pages affected" and a 49-row list, which hides the real message: there is one thing to fix, in one place.
The section classifier (#2307) now labels where each link sits, and link findings already carry per-page sections (sources, #837). Use that to say where the problem is.
Change: when the same item occurs in the same template region on most of the pages that have that region, report it once, scoped to the region: "In the site footer, on 49 of 53 pages: 'Sign in'". No page list in the compact formats; html keeps the list collapsed; json keeps the bounded list for tools. When an item sits in the page content, or in a region on only a few pages, it keeps its page list.
Region scope is computed at report time from data already stored: the item's section (from sources[].sections, or a new section on the item for page-scope rules such as a11y/link-text) and the number of pages that have that region (structure.sections). The denominator is the pages that have the region, not all pages, so a footer missing on some pages does not hide the finding.
First slice of rules: a11y/link-text, links/broken-links, links/broken-external-links, links/weak-internal-links, links/redirect-chains, links/anchor-text, links/tel-mailto and content/stale-copyright (footer). Others follow. No detection, severity or score change: only how a finding is located and displayed.
Acceptance Criteria
- An item found in a template region (header, footer, navigation, sidebar) on at least the documented share of the pages that have that region is shown once as scoped to the region ("In the site footer, on 49 of 53 pages"), with no per-page list in markdown, text, llm and console, and a collapsed list in html
- The share is a named, documented constant (start at 80% of pages that contain the region) and is the same in every format
- An item in the page content, or in a region present on few pages, keeps its page list and its section phrase
- Rules in the first slice record the section of the offending element, and
a11y/link-text(a page-scope rule) does too, matching the element to the classifier's placement - Different faulty items in the same region stay separate; the same item in two different regions stays separate
- json carries the scope (region, pages with the item, pages with the region) next to the bounded page list; detections, severities and scores are unchanged on the golden baseline
- Reports without section data (older stored crawls, classifier off) show today's page lists
-
docs/reports.mdx,docs/configuration/output.mdxand each changed rule page describe the wording and the threshold, and the CHANGELOG has an entry - A private issue covers the cloud publish schema for the new item fields
Activity
nc9 commentedon Oct 31, 2026
Closing, with one change to the first slice. Checked against main (5387823):
REGION_SCOPE_MIN_SHARE) with a two page minimum, the same share in every format, items in page content or in a region on few pages keeping their list and section phrase, separate items staying separate,scopebeside the bounded list in json and xml, today's lists without section data, and the docs (docs/reports.mdx,docs/configuration/output.mdx, the rule pages) and CHANGELOG entry (packages/report/src/region-scope.ts,region-scope-846.test.tsandregion-sections-846.test.ts, 41 tests).Audit engine golden testsjob is green on main at 5387823 (CI run 41154915491).links/weak-internal-linksis taken out of the first slice. Its item is the target page ("this page has one inbound link"), so every item is a different page and there is no repeated item to scope to a region. It keeps recording where the one link sits (meta.sections), and its page list stays. The other rules of the slice record the section of the offending element and are scoped (a11y/link-text,links/broken-links,links/broken-external-links,links/redirect-chains,links/anchor-text,links/tel-mailto,content/stale-copyright).structureblock the region wording needs).nik