Skip to content

A broken link in the header or footer of every page is reported in the same check, at the same severity, as one broken link on one page #1772

Closed

Description

@nc9

On the public demo site nutshop.squirrelscan.com (repo squirrelscan/nut-shop), two internal links were broken at once: one in the footer of every page, one in the body of a single product page.

The audit reports one check for both:

  • links/broken-links, fail: "2 broken internal link(s) (4xx/5xx)", with two items. The footer link carries linkedFrom: 71 and sections: {footer: 71}; the body link carries linkedFrom: 1.

The reach is in the item metadata, which is good. But the check, its message, its status and its weight are the same for both, so nothing in the result says that one of them is on every page a visitor sees. The cloud's summary wrote a single "Fix broken links" line. A triage agent that tracks problems by rule and check cannot give the two different priorities or close one without the other.

What is wanted

A broken link that sits in site-wide chrome (header, footer, navigation) and is linked from most pages is reported as its own check, for example broken-links-sitewide, with a message that says where it is and how many pages carry it. Broken links in page content stay in broken-links.

Acceptance Criteria

  • A broken internal link found in header, footer or navigation on at least a stated share of crawled pages is reported under a separate check name, with the section and the page count in the message.
  • Broken links in page content are reported as today.
  • The same split applies to links/broken-external-links.
  • The message of each check counts only its own links ("1 broken link in the footer of 71 pages", "1 broken link in page content").
  • The PR states the threshold (share of pages, minimum page count) and how a small site of a few pages is handled.
  • Score: the site-wide check does not double the penalty for the same link; a test shows the score for one footer link before and after.
  • The check names are added to the rule's docs page, and the PR notes that the new check name changes tracking keys for existing findings.

Activity

  1. added
    enhancement
    size: M
    rules
    on Nov 11, 2026
  2. added theissue type on Nov 11, 2026
  3. nc9 commented on Nov 16, 2026

    @nc9
    ContributorAuthor

    Accepted against main (d8f2be5). This shipped in #1787 (3dbc68a, 4e54e93).

    • Footer, header and nav links get their own check: broken-links-sitewide names the section and page count, e.g. "1 broken internal link in the footer of 71 pages".
    • Content links unchanged: they stay in broken-links. With no site-wide links, checks and messages are as before.
    • External links split the same way: broken-external-links-sitewide. possibly-broken-external-links isn't split.
    • Each message counts only its own links: covered.
    • Threshold: a link is site-wide when at least 3 pages carry it in page chrome and those are at least half the crawled pages. A 2-page site never splits. Documented in docs/rules/links/broken-external-links.mdx.
    • Score not doubled: each link lands in exactly one check, covered by the test "a link is in exactly one of the two checks, so the penalty is not doubled".
    • Docs and tracking keys: supersededChecks carries a finding across the split instead of reporting it fixed.

    packages/rules/tests/broken-links-sitewide-1772.test.ts: 17 pass. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementrulessize: M

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions