Repository navigation
fix(rules): eeat/about-page and contact-page recognise in-page #about and #contact sections #1208 - #1218
Conversation
|
Review of #1218. The approach is sound: the section needs both a matching id and a same-page link to it, and a real page still wins. I found no critical or high issues.
Docs and the CHANGELOG look consistent with the code. |
|
Round 1. Medium 1: kept page-wide contact method on purpose, it is the issue's spec ("the section, or the page holding it"); JSDoc and docs now say so, test added (footer mailto + empty section passes). Medium 2: word count uses getRenderedProseText, script-content test added. Low: contact docs paragraph reworded; id patterns tested only on linked ids, fragment anchors capped at 500; id encoded as /<encodeURIComponent(id)> (no .invalid host), slash/query ids test. Nits: contact precedence, different-case link id, non-root page tests added; about rule computes the section lazily in the else branch. |
|
Review of #1218. I read the diff and the
|
|
Review of #1218. I read the diff only and did not run the tests or lint. The change looks correct overall. Requiring both a matching id and a same-page
I have no (high) or (critical) findings. |
… and #contact sections #1208 Signed-off-by: Nik Cubrilovic <[email protected]>
…fragment cap, more tests #1208 Signed-off-by: Nik Cubrilovic <[email protected]>
5b534c0 to
f812e7d
Compare
|
Reviewed the diff. The approach is sound: the section needs both a matching id and a same-page fragment link, real pages take precedence, and the regex and DOM work is bounded. I found no blocking issues. I only read the diff and did not run the tests or lint.
|
Closes #1208.
When no About/Contact page is found, a crawled page with an element whose id matches the page slugs (as if the path
/<id>, localised slugs included) AND a same-page#fragmentlink to it counts as the section. About: 200+ words passes, fewer is info. Contact:mailto:/tel:link or a form on the page passes, otherwise info. Real pages take precedence;linkedUncrawledCheck(pub#740) is unchanged and runs after the section check. Rule solutions, both docs pages and CHANGELOG updated.Tests: new
tests/eeat-inpage-sections.test.ts(pass, thin, no fragment link, no element, localised ids, unrelated id, precedence); existing eeat tests unchanged.scripts/test-suites.ts --run rulespasses (8010).make validatepasses.Skill: the squirrelscan agent skill needs no change.