autofocus attribute used
Part of Documentation, UX & Accessibility, which counts for 15% of the overall score. When this check fires it deducts 4 points from that category, once per scan, no matter how many places it turns up.
What it detects
The autofocus attribute moves focus on load without user intent, which disorients screen-reader and keyboard users and can scroll the page unexpectedly. Svelte warns on this. Manage focus deliberately in response to a user action instead.
Why it matters
The autofocus attribute moves keyboard focus as soon as the element renders, before the user has chosen where to go. For screen-reader users this skips past context they needed to hear, and for keyboard users it can jump the page and scroll unexpectedly. Svelte warns on autofocus for these reasons.
How to fix it
Remove autofocus and manage focus deliberately in response to a user action, for example focusing a search field after the user opens the search panel. When you do need to move focus programmatically, do it with a Svelte action or in onMount using a ref, and only when it clearly helps the current task.
The paid report includes a ready-to-paste prompt for your AI coding agent for every check it finds, pointed at the exact findings from your scan. See pricing
Does your repo trip this check?
Paste a GitHub URL or drop a project folder. Scans run in your browser and take seconds.
Scan your repo