Skip to content
Back to skills

Fix Form Accessibility

ASecurity

Builds or repairs a web form with programmatic labels, grouping, autocomplete, helpful error messages and announced validation. Use for sign-up, checkout, settings or any data-entry form.

  • 2 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 26, 2026
ai-agentsjavascriptgojavareactexpressapi

Works with

  • api

Security analysis

A100/100

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

Scanned November 26, 2026

npx -y skills add hermes-hq/hodios-dist --skill fix-form-accessibility --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Fix Form Accessibility?

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

Security grade badge for Fix Form Accessibility
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/hermes-hq-fix-form-accessibility-hodios-dist/badge)](https://www.skillsdirectory.com/skills/hermes-hq-fix-form-accessibility-hodios-dist)

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
---
name: fix-form-accessibility
description: Builds or repairs a web form with programmatic labels, grouping, autocomplete, helpful error messages and announced validation. Use for sign-up, checkout, settings or any data-entry form.
license: CC0-1.0
metadata:
  version: 1.0.0
  kind: prompt
  category: accessibility
  source: https://hermes-ide.com/prompts/fix-form-accessibility
  catalog: 2026.1014.1
---

# Build or fix an accessible form

## Inputs

- [FORM] (required): Existing form code to repair, or a spec of the fields, rules and submit behaviour to build from.
- [FRAMEWORK] (optional): UI framework and form library, if any, for example "React with react-hook-form". Leave empty for plain HTML.

Take each value from the invocation or the user’s message. If a required value is missing, ask for it once.

<context>
Forms are where accessibility failures cost the most: a person who cannot complete sign-up or checkout leaves. The recurring faults are a placeholder used as the only label, radio buttons with no group label, errors shown only in red, errors that are not announced or not tied to their field, focus left on the submit button after a failed submit, a disabled submit button that never says why, and password or one-time-code fields that block paste.
</context>

<task>
Build or repair this form (framework: [FRAMEWORK]; if empty, use plain HTML and minimal JavaScript):

[FORM]

1. If you were given code, list its barriers first, each with its WCAG criterion. If you were given a spec, skip to building.
2. **Labels and structure:**
   - Every control has a visible `label` tied by `for` and `id`, or by wrapping. A placeholder is never the label.
   - Related radios, checkboxes and multi-part fields (date of birth, address) sit in a `fieldset` with a `legend`.
   - The label text matches the accessible name (2.5.3).
3. **Input purpose (1.3.5):** set `autocomplete` tokens for personal data (`name`, `given-name`, `email`, `tel`, `street-address`, `postal-code`, `cc-number`, `one-time-code`, `new-password`, `current-password`). Use the right `type` and `inputmode`: `type="email"` and `type="tel"`, and `inputmode="numeric"` instead of `type="number"` for codes and card numbers.
4. **Required fields and instructions:** use the native `required` attribute, plus a visible indicator that does not rely on colour alone. Tie format hints to their field with `aria-describedby`, and show them before the user types.
5. **Errors (3.3.1, 3.3.3):**
   - Validate on submit, and on blur only for a field that already has an error.
   - On a failed submit, either move focus to an error summary at the top that links to each field, or move focus to the first invalid field. Pick one and use it consistently.
   - Each field error is text that says how to fix it ("Enter a date like 21/04/1990"), is linked by `aria-describedby`, and sets `aria-invalid="true"`. Clear it as soon as the input becomes valid.
   - Announce async results (such as "username taken") through a polite live region that exists in the DOM before it changes.
6. **Do not** disable the submit button to signal invalid input. Do not block paste in password or code fields (3.3.8). Do not ask again for information already given in the same process (3.3.7). Keep targets at least 24 by 24 CSS pixels (2.5.8).
7. Keep the existing visual design and validation rules. Change only what accessibility requires, and say where it required a visible change.
</task>

<constraints>
- Native HTML first. Add ARIA only where HTML cannot express it.
- With a form library, use its own error and registration APIs rather than working around them.
- Do not invent validation rules the form or spec did not have. List any you think are missing in one line each.
- Read the relevant code before making a claim about it. Do not guess what a file, function or config contains.
- If the information you need is not available, say what is missing and how to get it instead of inventing it.
</constraints>

<output_format>
## Issues
| # | Problem | WCAG SC | Field or line | Fix |
Write "Built from spec" instead when no code was given.

## Code
The complete fixed or new form.

## Validation behaviour
Numbered: when validation runs, where focus goes, and what is announced.

## Test checklist
Keyboard-only and screen-reader checks for filling, failing, fixing and submitting the form.
</output_format>

Files in this skill

  • SKILL.md4.3 KB
  • agents/openai.yaml311 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 ai-agents →

Comments

Loading comments…

Newsletter

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