Missing <main> landmark in Svelte
Landmarks like <main>, <nav>, and <article> tell assistive tech and content extractors where the primary content is, instead of forcing them to guess from a sea of <div>s. Screen-reader users jump straight to <main>; answer engines use it to separate content from chrome. AI scaffolds output <div>-only trees, so this signal is simply absent.
Framework fixes
Symptoms
How VibeCheck catches it
In your widget · Problems
No <main> landmark
To your coding agent · MCP
agent › get_detected_issues
→ { detector: "aeo", issue: "No <main> landmark", threshold: "document.querySelector("main") returns null" }
The same string in your widget and in your agent’s context — no screenshot, no copy-paste.
Root causes
The fix for Svelte
Wrap the page slot in <main> in your root +layout.svelte.
<SiteHeader />
<main>
<slot />
</main>
<SiteFooter />Steps
- Identify the primary content region unique to the page
- Wrap it in a single
<main>element - Use
<nav>/<header>/<footer>for the surrounding chrome
FAQ
- Can I have more than one
<main>? - Only one
<main>should be visible per page. You may have multiple in the DOM if all but one are hidden, but the simplest and safest approach is exactly one visible<main>per page. - What goes inside
<main>vs outside? <main>holds the content unique to this page. The site header, primary navigation, and footer are repeated across pages, so they belong in<header>,<nav>, and<footer>outside<main>.