Skip to content
Back to skills

Common Accessibility

ASecurity

A red border is only a visual cue, so it is insufficient by itself. Make the error state available through text, semantics, and focus behavior: - Keep a visible, specific error message next to the field, such as “Email address must contain an @.” Do not rely on the border or red color alone; add an icon only if it has an accessible name or is marked decorative. - Give the input `aria-invalid="true"` while invalid and connect it to the message with `aria-describedby`. Keep the normal `<label>`...

  • 584 stars
  • 0 votes
  • 0 copies
  • 3 views
  • Added September 5, 2026
developmentgo

Security analysis

A100/100

Pro scans all 11 files and shows the line behind each finding

Scanned September 5, 2026

npx -y skills add HoangNguyen0403/agent-skills-standard --skill common-accessibility --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Common Accessibility?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Common Accessibility
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hoangnguyen0403-common-accessibility-eac4bdcf/badge)](https://www.skillsdirectory.com/skills/hoangnguyen0403-common-accessibility-eac4bdcf)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
A red border is only a visual cue, so it is insufficient by itself. Make the error state available through text, semantics, and focus behavior:

- Keep a visible, specific error message next to the field, such as “Email address must contain an @.” Do not rely on the border or red color alone; add an icon only if it has an accessible name or is marked decorative.
- Give the input `aria-invalid="true"` while invalid and connect it to the message with `aria-describedby`. Keep the normal `<label>` in place; do not use the error text as the only label.
- Announce newly displayed errors with a suitable live mechanism, for example an error message with `role="alert"` for an immediate validation error, or a polite live region for non-critical asynchronous status. Avoid repeatedly interrupting the user on every keystroke.
- On submit, provide an error summary when there are multiple errors and move focus to the summary or the first invalid field. The summary should link to each invalid control. Preserve logical keyboard order and never trap focus unintentionally.
- Ensure the error message text has at least 4.5:1 contrast against its background. The red border/state indicator must be distinguishable at at least 3:1 against adjacent colors, and focus styling must remain separately visible. Test the error state in light/dark themes and high-contrast modes.
- State the invalid condition in text or another non-color form, and ensure errors are conveyed consistently to keyboard and screen-reader users. Correct the error when the value becomes valid and remove `aria-invalid` when appropriate.

Example:

```html
<label for="email">Email address</label>
<input id="email" name="email" type="email"
       aria-invalid="true" aria-describedby="email-error">
<p id="email-error" role="alert">Enter a valid email address.</p>
```

Verify with axe-core, a keyboard-only pass, NVDA or VoiceOver, 200% zoom, and a color-contrast check. The goal is that the same error is understandable without seeing color and is announced when it appears.

Files in this skill

  • eval-1.baseline.md3.9 KB
  • eval-1.with-skill.md2.6 KB
  • eval-2.baseline.md2.7 KB
  • eval-2.with-skill.md2.3 KB
  • eval-3.baseline.md2.2 KB
  • eval-3.with-skill.md2 KB
  • trigger-1.md145 B
  • trigger-2.md127 B
  • trigger-3.md128 B
  • trigger-4.md131 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.