detecting-accessibility-issues
Expert tool for auditing and correcting accessibility defects in React/Fluent UI webview components.
Install
mkdir -p .claude/skills/detecting-accessibility-issues && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/10778" && unzip -o skill.zip -d .claude/skills/detecting-accessibility-issues && rm skill.zipInstalls to .claude/skills/detecting-accessibility-issues
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Detects and fixes accessibility issues in React/Fluent UI webviews. Use when reviewing code for screen reader compatibility, fixing ARIA labels, ensuring keyboard navigation, adding live regions for status messages, or managing focus in dialogs.Key capabilities
- →Detect missing ARIA labels
- →Manage focus in modals
- →Enforce accessible patterns for tooltips
- →Announce status changes with Announcer
- →Identify redundant aria-labels
How it works
The skill scans React/Fluent UI components for accessibility violations and provides specific code patches for ARIA attributes, focus management, and status announcements.
Inputs & outputs
When to use detecting-accessibility-issues
- →Fix aria labels
- →Audit keyboard accessibility
- →Improve screen reader compatibility
About this skill
Accessibility Expert for Webviews
Verify and fix accessibility in React/Fluent UI webview components.
When to Use
- Review webview code for accessibility issues
- Fix double announcements from screen readers
- Add missing
aria-labelto icon-only buttons or form inputs - Make tooltips accessible to keyboard/screen reader users
- Announce status changes (loading, search results, errors)
- Manage focus when dialogs/modals open
- Group related controls with proper labels
Core Pattern: Tooltip Accessibility
Tooltips require aria-label + aria-hidden to avoid double announcements:
<Tooltip content="Detailed explanation">
<Badge tabIndex={0} className="focusableBadge" aria-label="Badge text. Detailed explanation">
<span aria-hidden="true">Badge text</span>
</Badge>
</Tooltip>
aria-label: Full context (visible text + tooltip)aria-hidden="true": Wraps visible text to prevent duplication- Screen reader hears: "Badge text. Detailed explanation"
Detection Rules
1. Tooltip Without aria-label Context
❌ Problem: Tooltip content inaccessible to screen readers
<Tooltip content="Save document to database">
<Button aria-label="Save">Save</Button>
</Tooltip>
✅ Fix: Include tooltip in aria-label
<Tooltip content="Save document to database" relationship="description">
<Button aria-label="Save document to database">Save</Button>
</Tooltip>
2. Missing aria-hidden (Double Announcement)
❌ Problem: Screen reader says "Collection scan Collection scan"
<Badge aria-label="Collection scan. Query is inefficient">Collection scan</Badge>
✅ Fix: Wrap visible text
<Badge aria-label="Collection scan. Query is inefficient">
<span aria-hidden="true">Collection scan</span>
</Badge>
3. Redundant aria-label (NOT Needed)
❌ Problem: aria-label identical to visible text adds no value
<Button aria-label="Save">Save</Button>
<ToolbarButton aria-label="Validate" icon={<CheckIcon />}>Validate</ToolbarButton>
✅ Fix: Remove redundant aria-label OR make it more descriptive
<Button>Save</Button>
<ToolbarButton icon={<CheckIcon />}>Validate</ToolbarButton>
Keep aria-label only when it adds information:
<ToolbarButton aria-label="Save document to database" icon={<SaveIcon />}>
Save
</ToolbarButton>
4. Icon-Only Button Missing aria-label
❌ Problem: No accessible name
<ToolbarButton icon={<DeleteRegular />} onClick={onDelete} />
✅ Fix: Add aria-label
<Tooltip content="Delete selected items" relationship="description">
<ToolbarButton aria-label="Delete selected items" icon={<DeleteRegular />} onClick={onDelete} />
</Tooltip>
5. Decorative Elements Not Hidden
❌ Problem: Progress bar announced unnecessarily
<ProgressBar thickness="large" />
✅ Fix: Hide decorative elements
<ProgressBar thickness="large" aria-hidden={true} />
6. Input Missing Accessible Name
❌ Problem: SpinButton/Input without accessible name
<SpinButton value={skipValue} onChange={onSkipChange} />
<Input placeholder="Enter query..." />
✅ Fix: Add aria-label or associate with label element
<SpinButton aria-label="Skip documents" value={skipValue} onChange={onSkipChange} />
<Label htmlFor="query-input">Query</Label>
<Input id="query-input" placeholder="Enter query..." />
7. Visible Label Not in Accessible Name
❌ Problem: aria-label doesn't contain visible text (breaks voice control)
<ToolbarButton aria-label="Reload data" icon={<RefreshIcon />}>
Refresh
</ToolbarButton>
✅ Fix: Accessible name must contain visible label exactly
<ToolbarButton aria-label="Refresh data" icon={<RefreshIcon />}>
Refresh
</ToolbarButton>
Voice control users say "click Refresh" – only works if accessible name contains "Refresh".
8. Status Changes Not Announced
❌ Problem: Screen reader doesn't announce dynamic content
<span>{isLoading ? 'Loading...' : `${count} results`}</span>
✅ Fix: Use the Announcer component
import { Announcer } from '<relative-path>/components/accessibility';
// Announces when `when` transitions from false to true
<Announcer when={isLoading} message={l10n.t('Loading...')} />
// Dynamic message based on state
<Announcer
when={!isLoading && documentCount !== undefined}
message={documentCount > 0 ? l10n.t('Results found') : l10n.t('No results found')}
/>
Use for: loading states, search results, success/error messages.
9. Dialog Opens Without Focus Move
❌ Problem: Focus stays on trigger when modal opens
{
isOpen && <Dialog>...</Dialog>;
}
✅ Fix: Move focus programmatically
const dialogRef = useRef<HTMLDivElement>(null);
useEffect(() => {
if (isOpen) dialogRef.current?.focus();
}, [isOpen]);
{
isOpen && (
<Dialog ref={dialogRef} tabIndex={-1} aria-modal="true">
...
</Dialog>
);
}
10. Related Controls Without Group Label
❌ Problem: Buttons share visual label but screen reader misses context
<span>How would you rate this?</span>
<Button>👍</Button>
<Button>👎</Button>
✅ Fix: Use role="group" with aria-labelledby
<div role="group" aria-labelledby="rating-label">
<span id="rating-label">How would you rate this?</span>
<Button aria-label="I like it">👍</Button>
<Button aria-label="I don't like it">👎</Button>
</div>
When to Use aria-hidden
DO use on:
- Visible text when aria-label provides complete context
- Decorative icons, spinners, progress bars
- Visual separators (`|`, `—`)
DO NOT use on:
- The only accessible content (hides it completely)
- Interactive/focusable elements
- Error messages or alerts
focusableBadge Pattern
For keyboard-accessible badges with tooltips:
- Import: `import '../components/focusableBadge/focusableBadge.scss';`
- Apply attributes:
<Badge tabIndex={0} className="focusableBadge" aria-label="Visible text. Tooltip details">
<span aria-hidden="true">Visible text</span>
</Badge>
Screen Reader Announcements
Use the Announcer component for WCAG 4.1.3 (Status Messages) compliance.
import { Announcer } from '<relative-path>/components/accessibility';
Basic Usage
// Announces "AI is analyzing..." when isLoading becomes true
<Announcer when={isLoading} message={l10n.t('AI is analyzing...')} />
// Dynamic message based on state (e.g., query results)
<Announcer
when={!isLoading && documentCount !== undefined}
message={documentCount > 0 ? l10n.t('Results found') : l10n.t('No results found')}
/>
// With assertive politeness (default is polite)
<Announcer when={hasError} message={l10n.t('Error occurred')} politeness="assertive" />
Props
when: Announces when this transitions fromfalsetotruemessage: The message to announce (usel10n.t()for localization)politeness:'assertive'(default, interrupts) or'polite'(waits for idle)
Key Points
- Placement doesn't matter - screen readers monitor all live regions regardless of DOM position; place near related UI for code readability
- Store relevant state (e.g.,
documentCount) to derive dynamic messages - Use
l10n.t()for messages - announcements must be localized - Condition resets automatically - when
whengoes back tofalse, it's ready for the next announcement - Prefer 'assertive' for user-initiated actions, 'polite' for background updates
Quick Checklist
- Icon-only buttons have
aria-label - Form inputs have associated labels or
aria-label - Tooltip content included in
aria-label - Visible text wrapped in
aria-hidden="true"when aria-label duplicates it - Redundant aria-labels removed (identical to visible text)
- Visible button labels match accessible name exactly (for voice control)
- Decorative elements have
aria-hidden={true} - Badges with tooltips use
focusableBadgeclass +tabIndex={0} - Status updates use
Announcercomponent - Focus moves to dialog/modal content when opened
- Related controls wrapped in
role="group"witharia-labelledby
References
- WCAG 2.1.1 Keyboard
- WCAG 2.4.3 Focus Order
- WCAG 2.5.3 Label in Name
- WCAG 4.1.2 Name, Role, Value
- WCAG 4.1.3 Status Messages
- See
src/webviews/components/focusableBadge/focusableBadge.mdfor the Badge pattern
When not to use it
- →When content is purely decorative and already hidden
- →When aria-labels are identical to visible text
Prerequisites
Limitations
- →Requires manual review of suggested patches
- →Limited to React/Fluent UI webview components
How it compares
Unlike generic linting, this skill provides context-aware fixes for specific UI patterns like icon-only buttons and modal focus traps.
Compared to similar skills
detecting-accessibility-issues side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| detecting-accessibility-issues (this skill) | 0 | 2mo | No flags | Intermediate |
| ui-ux-expert-skill | 91 | 9mo | Review | Advanced |
| ui-testing | 4 | 4mo | Review | Beginner |
| a11y-audit | 0 | 4mo | Review | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by microsoft
View all by microsoft →You might also like
ui-ux-expert-skill
fercracix33
Technical workflow for implementing accessible React user interfaces with shadcn/ui, Tailwind CSS, and TanStack Query. Includes 6-phase process with mandatory Style Guide compliance, Context7 best practices consultation, Chrome DevTools validation, and WCAG 2.1 AA accessibility standards. Use after Test Agent, Implementer, and Supabase agents complete their work.
ui-testing
alinaqi
Visual testing - catch invisible buttons, broken layouts, contrast
a11y-audit
jarbitechture
Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating acce
verify-bulk-action-bar
junnv93
BulkActionBar 패턴 SSOT 검증 — count chip aria-live, role=toolbar, Esc clear, indeterminate Radix, focus management, IME guard. 일괄 작업 UI 변경 시 트리거. canonical = components/common/BulkActionBar.tsx (도메인 무관 generic), components/approvals/BulkActionBar.tsx는 approvals 특화 wrapper.
rule-accessibility
btabaska
MANDATORY when editing files matching ["frontend/src/**/*.tsx", "frontend/src/**/*.ts"]. Accessibility requirements for all frontend code. WCAG 2.1 AA and Section 508 compliance is legally mandated for this federal project.
audit
educlopez
Technical UI audit — a11y, performance, responsive. Produces a prioritized findings table. Invoke when the user asks for audit on their UI, or mentions 'audit' alongside design / UI / frontend work.