Svelte A11y
$ npx claude-code-templates@latest --command="svelte/svelte-a11y" --yesRequires Claude Code. The command adds this command to your project's .claudedirectory — nothing runs on ToolZip's servers.
What's inside this command
Component source
/svelte:a11y
Audit and improve accessibility in Svelte/SvelteKit applications, ensuring WCAG compliance and inclusive user experiences.
Instructions
You are acting as the Svelte Development Agent focused on accessibility. When improving accessibility:
- Accessibility Audit:
- Check WCAG 2.1 AA/AAA compliance
- Test with screen readers
- Verify keyboard navigation
- Analyze color contrast
- Review ARIA usage
- Common Issues & Fixes:
Component Accessibility:
<!-- Bad -->
<div>Click me</div>
<!-- Good -->
<button aria-label="Action description">
Click me
</button>
Form Accessibility:
<label for="email">Email Address</label>
<input
id="email"
type="email"
required
aria-describedby="email-error"
/>
{#if errors.email}
<span id="email-error" role="alert">
{errors.email}
</span>
{/if}
- Navigation & Focus:
// Skip links
<a href="#main" class="skip-link">Skip to main content</a>
// Focus management
onMount(() => {
if (shouldFocus) {
element.focus();
}
});
// Keyboard navigation
function handleKeydown(event) {
if (event.key === 'Escape') {
closeModal();
}
}
- ARIA Implementation:
- Add ARIA labels for clarity
- Implement live regions
- Manage focus properly
- Announce dynamic changes
- Testing Tools:
- axe-core integration
- Pa11y CI setup
- Screen reader testing
- Keyboard navigation testing
- Accessibility Checklist:
- [ ] Proper heading hierarchy
- [ ] Images have alt text
- [ ] Color contrast meets standards
- [ ] Forms have proper labels
- [ ] Error messages announced
- [ ] Focus indicators visible
- [ ] Page has unique title
- [ ] Landmarks properly used
- [ ] Animations respect prefers-reduced-motion
Example Usage
User: "Audit my e-commerce site for accessibility issues"
Assistant will:
- Run automated accessibility scan
- Check product cards for proper markup
- Verify cart keyboard navigation
- Test checkout form accessibility
- Review color contrast on CTAs
- Add ARIA labels where needed
- Implement focus management
- Create accessibility test suite
- Provide WCAG compliance report
Related Claude Code Commands
Svelte Debug
A ready-to-install Claude Code component.
Svelte Test Coverage
A ready-to-install Claude Code component.
Svelte Component
Create new Svelte components with best practices, TypeScript support, and testing
Svelte Optimize
A ready-to-install Claude Code component.
Svelte Test Setup
A ready-to-install Claude Code component.
Svelte Test
A ready-to-install Claude Code component.
Catalog data and component content are sourced from the open-source davila7/claude-code-templates project (MIT license). ToolZip curates the listing and writes original descriptions; every component links back to its original source. Claude Code is a product of Anthropic. ToolZip is an independent catalog and is not affiliated with or endorsed by Anthropic.