Repository navigation
Description
Problem
On a single-page site, eeat/about-page and eeat/contact-page warn "No About page found" and "No Contact page found" even when the page has a clear About section and a Contact section with an email link.
Both rules look only for a separate page: a URL path that matches EEAT_PAGE_PATTERNS (/about, /contact and localised slugs) or a page-level AboutPage / ContactPage schema type. A one-page site puts these as sections of the homepage, for example:
<nav><a href="#about">About</a> <a href="#contact">Contact</a></nav>
<section id="about"><h2>Who we are</h2> ...</section>
<section id="contact"><h2>Let's talk</h2> <a href="mailto:[email protected]">Email us</a></section>The rules can't see these, so the report says the About and Contact are missing while the page plainly has them. Owners read that as a false positive, and an agent following the fix ("Create /about or /about-us page") would add pages the owner may not want.
Seen on a real cloud report (a single-page static site, 1 of 1 discovered page, crawl complete): 9 <section id> blocks including id="about" and id="contact", a mailto: link, and both rules warning.
Proposed behaviour
When no About/Contact page is found, check the crawled pages for an in-page section:
- An element with an
idthat matches the about/contact patterns (about,about-us,contact,contact-usand the localised slugs inEEAT_PAGE_PATTERNS, matched as if it were the path/<id>), and a same-page fragment link pointing to it (href="#about"), so a stray id doesn't count. - About section: same word-count bar as the page check (≥200 words → pass, fewer → info "About section exists but has limited content").
- Contact section: pass when the section, or the page holding it, has a
mailto:ortel:link, or a form. Otherwise info, the same way a thin contact page is treated now. - Messages name the section: "About section found on the homepage (#about)", "Contact section found on the homepage (#contact)".
- A real
/aboutor/contactpage still takes precedence. A multi-page site with no About page and only an#aboutsection on one page still passes through the section check. That's intended: the content exists and is linked. linkedUncrawledCheck(pub#740) behaviour is unchanged.
Acceptance Criteria
- A one-page fixture with
<a href="#about">and a<section id="about">holding ≥200 words passeseeat/about-pagewith a message naming the section. - The same fixture with a 50-word About section reports
info(limited content), notwarn. - A one-page fixture with
<a href="#contact">, a<section id="contact">and amailto:link passeseeat/contact-page. - An element with
id="about"and no fragment link pointing to it does not count as an About section. - A localised section id (for example
#uber-uns,#contacto) is recognised the same way as the localised page slugs. - Sites with a real
/aboutor/contactpage give the same results as before (existing tests unchanged). - Rule
solutiontext anddocs/rules/eeat/about-page.mdxandcontact-page.mdxdescribe the in-page section case. -
scripts/test-suites.ts --run rulespasses.
Skill: no change expected to the squirrelscan agent skill.
Activity
fix(rules): in-page section: rendered prose words, encoded id match, …
fix(rules): eeat/about-page and contact-page recognise in-page #about…
fix(rules): in-page section: rendered prose words, encoded id match, …
fix(rules): eeat/about-page and contact-page recognise in-page #about…
fix(rules): in-page About and Contact sections work in the streaming …