agentleFS
EndavaEndava/BEEQ/.agents/skills/fix-accessibility/SKILL.md

fix-accessibility

Skill162 starsChanged 12 days agoApache-2.0View on GitHub

Audit and fix WCAG 2.1 AA issues in a `bq-*` component: ARIA, keyboard navigation, focus, contrast and screen-reader support, including the accessibility e2e tests. Use when a component has a known or suspected accessibility problem. For a general review use review-component.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Read the accessibility instructions.

    line 20
  2. Very specific:

    Read the component's .tsx and its SCSS: note the semantic elements used and which shadow parts are exposed.

    line 21
  3. Distinctive:

    Check the component against every section of the instructions: semantic HTML, labels and names, roles and state, keyboard navigation, focus …

    line 22
  4. Distinctive:

    Add an e2e assertion for every fix, following the testing instructions and the write-e2e-tests skill:

    line 69

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Fix Accessibility in a BEEQ Component

When to Use

  • A component fails an accessibility audit or axe scan, or a PR review flagged missing ARIA attributes.
  • Keyboard navigation is broken or incomplete, a screen reader announces the wrong role, state or label, or focus is lost after an interaction.

Procedure

1. Audit

  1. Read the accessibility instructions. They hold every rule; this skill adds none.
  2. Read the component's .tsx and its SCSS: note the semantic elements used and which shadow parts are exposed.
  3. Check the component against every section of the instructions: semantic HTML, labels and names, roles and state, keyboard navigation, focus management, color and contrast, live regions.

Done when every section has a verdict and every violation has a location.

2. Fix

Apply the smallest change that resolves each violation, using the patterns below.

Icon-only button

<button aria-label={this.label} aria-disabled={this.disabled ? 'true' : undefined}>
  <slot />
</button>

/** Accessible label for screen readers. Required when the button contains only an icon. */
@Prop({ reflect: true }) label?: string;

Expandable element

<div
  role="button"
  aria-expanded={this.open ? 'true' : 'false'}
  aria-controls="panel-id"
  tabindex="0"
  onKeyDown={this.handleKeyDown}
>

Error-linked input

<input
  aria-describedby={this.hasError ? `${this.name}-error` : undefined}
  aria-invalid={this.hasError ? 'true' : undefined}
/>
{this.hasError && (
  <span id={`${this.name}-error`} role="alert">{this.errorMessage}</span>
)}

Done when each violation is fixed in source.

3. Test

Add an e2e assertion for every fix, following the testing instructions and the write-e2e-tests skill:

it('should have aria-label on icon-only button', async () => {
  const { root } = await render(<bq-button only-icon label="Close" />);
  const btn = (root as HTMLBqButtonElement).shadowRoot?.querySelector<HTMLButtonElement>('[part="button"]');
  expect(btn).toEqualAttribute('aria-label', 'Close');
});

it('should have aria-expanded when open', async () => {
  const { root, setProps } = await render(<bq-accordion />);
  await setProps({ open: true });
  const base = (root as HTMLBqAccordionElement).shadowRoot?.querySelector('[part="header"]');
  expect(base).toEqualAttribute('aria-expanded', 'true');
});

Done when every fix has a test that fails without it.

4. Report

Issues: for each problem list:

  • Element / prop / line: location, as a workspace-relative markdown link.
  • WCAG criterion: the violated criterion (e.g. 1.3.1, 4.1.2).
  • Severity: critical (blocks assistive technology) | serious (significant barrier) | moderate (inconvenience) | minor.
  • Fix: the concrete change.

Recommendations: improvements that are not violations but would help assistive-technology users.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.