Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
community-access avatar

Framework Accessibility

  • 188 installs
  • 381 repo stars
  • Updated August 4, 2026
  • community-access/accessibility-agents

Apply framework-specific accessibility fixes in React, Vue, Angular, or similar stacks using idiomatic components, hooks, routing focus traps, and lint-friendly patterns.

About

Guides accessible implementation within popular JavaScript frameworks, covering idiomatic ARIA usage, focus traps in single-page apps, accessible routing announcements, landmark structure, and integration with ecosystem lint rules and headless component libraries.

  • React accessibility idioms
  • Vue ARIA bindings
  • SPA focus management
  • eslint-plugin-jsx-a11y alignment
  • Accessible component primitives

Framework Accessibility by the numbers

  • 188 all-time installs (skills.sh)
  • Ranked #875 of 2,245 Frontend Development skills by installs in the Skillselion catalog
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/community-access/accessibility-agents --skill framework-accessibility

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs188
repo stars381
Last updatedAugust 4, 2026
Repositorycommunity-access/accessibility-agents

What it does

Apply framework-specific accessibility fixes in React, Vue, Angular, or similar stacks using idiomatic components, hooks, routing focus traps, and lint-friendly patterns.

Files

SKILL.mdMarkdownGitHub ↗

<!-- CANONICAL SOURCE: .github/skills/framework-accessibility/SKILL.md -- Edit the canonical source; sync to Gemini via scripts/check-gemini-sync.ps1 -->

Framework-Specific Accessibility Patterns

React / Next.js

Common Pitfalls

PatternIssueFix
onClick on <div>Not keyboard accessibleUse <button> or add role="button", tabIndex={0}, onKeyDown
dangerouslySetInnerHTMLMay inject inaccessible contentAudit injected HTML for ARIA, headings, alt text
React.Fragment as rootMay break landmark treeEnsure fragments don't interrupt landmark nesting
Missing key on listsCan cause focus loss on re-renderUse stable keys (not array index) for interactive lists
Portal without focus trapFocus can escape to backgroundWrap portal content in FocusTrap component
useEffect focus managementFocus may not fire on mountUse useRef + useEffect with proper dependency array

Fix Templates

// Bad: div as button
<div onClick={handleClick}>Submit</div>

// Good: semantic button
<button onClick={handleClick}>Submit</button>

// Bad: image without alt in Next.js
<Image src="/hero.jpg" width={800} height={400} />

// Good: image with alt
<Image src="/hero.jpg" width={800} height={400} alt="Team collaborating in a modern office" />

// Bad: no focus management on route change
useEffect(() => {
  // nothing
}, [location]);

// Good: focus management on route change
useEffect(() => {
  const mainContent = document.getElementById('main-content');
  if (mainContent) {
    mainContent.focus();
    mainContent.scrollIntoView();
  }
}, [location]);

// Bad: link opening new tab
<a href={url} target="_blank">Resource</a>

// Good: link with new tab warning
<a href={url} target="_blank" rel="noopener noreferrer">
  Resource <span className="sr-only">(opens in new tab)</span>
</a>

Vue

Common Pitfalls

PatternIssueFix
v-html with user contentMay inject inaccessible markupSanitize and audit injected HTML
v-if on live regionsRemoves element from DOM, breaks announcementsUse v-show for live regions instead
<transition> without focusFocus lost when content transitionsManage focus in @after-enter hook
<teleport> to bodyContent outside app landmark treeAdd landmark roles to teleported content

Fix Templates

<!-- Bad: v-if on live region -->
<div v-if="message" aria-live="polite">{{ message }}</div>

<!-- Good: v-show keeps element in DOM -->
<div v-show="message" aria-live="polite">{{ message }}</div>

<!-- Bad: no focus after transition -->
<transition name="fade">
  <div v-if="showModal" class="modal">...</div>
</transition>

<!-- Good: focus managed after transition -->
<transition name="fade" @after-enter="focusModal">
  <div v-if="showModal" ref="modal" class="modal" tabindex="-1">...</div>
</transition>

Angular

Common Pitfalls

PatternIssueFix
[aria-label] bindingInvalid - ARIA is not a propertyUse [attr.aria-label]
*ngFor without trackByFocus loss on list re-renderAdd trackBy function
No LiveAnnouncerRoute changes not announcedInject LiveAnnouncer and announce navigation
OnPush + live regionsChange detection may not triggerUse ChangeDetectorRef.markForCheck()

Fix Templates

// Bad: ARIA binding
<button [aria-label]="label">X</button>

// Good: ARIA attribute binding
<button [attr.aria-label]="label">X</button>

// Bad: ngFor without trackBy
<li *ngFor="let item of items">{{ item.name }}</li>

// Good: ngFor with trackBy
<li *ngFor="let item of items; trackBy: trackById">{{ item.name }}</li>

// Route change announcements
constructor(private liveAnnouncer: LiveAnnouncer, private router: Router) {
  this.router.events.pipe(
    filter(event => event instanceof NavigationEnd)
  ).subscribe((event: NavigationEnd) => {
    this.liveAnnouncer.announce(`Navigated to ${this.getPageTitle()}`);
  });
}

Svelte

Common Pitfalls

PatternIssueFix
{#if} without focus managementFocus lost when content appearsUse use:action to focus new content
transition: without motion checkAnimations play regardless of user preferenceAdd prefers-reduced-motion check
on:click on non-interactiveNot keyboard accessibleUse <button> or add keyboard handlers

Fix Templates

<!-- Bad: click on div -->
<div on:click={toggle}>Toggle</div>

<!-- Good: keyboard accessible -->
<button on:click={toggle}>Toggle</button>

<!-- Bad: animation without motion preference -->
<div transition:fly={{ y: 200 }}>Content</div>

<!-- Good: respects motion preference -->
<div transition:fly={{ y: reducedMotion ? 0 : 200, duration: reducedMotion ? 0 : 300 }}>Content</div>

<script>
  const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
</script>

Tailwind CSS

Common Pitfalls

PatternIssueFix
outline-noneRemoves focus indicatorPair with ring-2 ring-offset-2 focus-visible:ring-blue-500
text-gray-400 on bg-whiteFails 4.5:1 contrastUse text-gray-600 or darker
No motion-reduce: variantAnimations ignore user preferenceAdd motion-reduce:transition-none
Missing focus: stylesNo visible focus indicatorAdd focus:ring-2 focus:ring-blue-500
sr-only missingScreen reader text not availableAdd <span class="sr-only">description</span>

Contrast-Safe Tailwind Pairs

BackgroundMinimum TextRatio
bg-whitetext-gray-6004.55:1
bg-whitetext-gray-7006.62:1
bg-gray-50text-gray-7006.29:1
bg-gray-900text-gray-3005.92:1
bg-blue-600text-white5.23:1
bg-red-600text-white4.54:1
bg-green-700text-white4.58:1

Fix Templates

<!-- Bad: no focus indicator -->
<button class="bg-blue-500 text-white px-4 py-2 rounded outline-none">
  Submit
</button>

<!-- Good: visible focus indicator -->
<button class="bg-blue-500 text-white px-4 py-2 rounded focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2">
  Submit
</button>

<!-- Bad: low contrast -->
<p class="text-gray-400">Important information</p>

<!-- Good: adequate contrast -->
<p class="text-gray-700">Important information</p>

<!-- Bad: animation without motion preference -->
<div class="transition-transform duration-300 hover:scale-105">Card</div>

<!-- Good: respects motion preference -->
<div class="transition-transform duration-300 hover:scale-105 motion-reduce:transition-none motion-reduce:hover:scale-100">Card</div>

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.