Skip to content

links/no-contextual-inbound: skip legal pages (imprint, privacy, terms) linked only from the footer #981

Closed

Description

@deniskern

Summary

links/no-contextual-inbound flags legal pages (imprint, privacy, terms, /legal, /agb, /impressum, /datenschutz) that are linked only from the sitewide footer. These pages are footer-only by design on almost every site, so the finding is noise.

Repro

<!-- index.html -->
<main><p>Welcome. <a href="/about">About us</a></p></main>
<footer><a href="/impressum">Impressum</a> <a href="/datenschutz">Datenschutz</a> <a href="/agb">AGB</a></footer>

Same footer on /about; /impressum, /datenschutz and /agb are plain text pages with that footer.

squirrel audit http://localhost:8080 --http -f json

Actual

links/no-contextual-inbound: "3 page(s) are linked only from sitewide chrome" listing /impressum, /datenschutz, /agb.

Expected

Legal page types (imprint/Impressum, privacy/Datenschutz, terms/AGB, /legal) are skipped, as the rule already reasons about page intent. Seen on a production site with /en/legal (4 pages) and /agb.

Version

squirrel v0.0.123

Acceptance Criteria

  • links/no-contextual-inbound does not report legal pages (imprint/Impressum, privacy/Datenschutz, terms/AGB, /legal) that are linked only from sitewide chrome
  • The repro above reports no finding for /impressum, /datenschutz and /agb
  • A non-legal page linked only from the footer is still reported
  • A test covers the legal-page skip, including a localized path such as /en/legal
  • Rule docs and CHANGELOG mention the skip
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions