Defra accessibility expectations — WCAG 2.2 AA for code-generating roles (frontend, backend rendering HTML), and semantic-markup expectations for documentation roles. Use when the agent generates a page, a component, a markdown file, or any artefact that will be read by a screen reader, a keyboard-only user, or a user with reduced vision.
Ships in defra-shared. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Defra services are public-sector services governed by the Public Sector Bodies (Websites and Mobile Applications) Accessibility Regulations 2018. The agent assumes WCAG 2.2 AA is a minimum bar, not a target, for every code-generating role. Documentation roles meet a parallel "semantic markup" bar.
<label for="…"> or the equivalent govukInput({ label: { … } }) macro argument. Placeholder text is not a label.<h1> and a logical heading hierarchy (no skipping <h1> to <h3>). The <h1> matches the page's question or task.govukErrorSummary at the top of the page (as a list of links to the offending fields) and inline next to each field via errorMessage. Field IDs in the summary href match the field's id exactly.alt="" for decorative ones; never omit the attribute. SVG icons used as buttons have an aria-label.<th scope="col|row">; complex tables use <caption>. Layout-via-<table> is forbidden.click here, read more, link. Visually-hidden text fills in the context (<span class="govuk-visually-hidden">).prefers-reduced-motion.##, ###, in order; never bold-as-heading. — describe the information, not the file.[Defra software development standards](https://…) — never [click here](…) or [link](…).|---|---|).The agent applies the same rule for any user-facing prose it writes (release notes, error messages, README installation steps).
<input> with no <label>, or label-by-placeholder.<h1> on a page.click here / read more / link / here.alt="" on a content image (it must be descriptive); missing alt on any image.*:focus { outline: none }).If the user asks the agent to do any of the above, the agent refuses and explains which Success Criterion is at stake.
User: "Just add a quick error message under the email input — don't bother with the summary."
Agent response:
I'll wire both the inline error and the summary — Defra accessibility (WCAG 2.2 AA, SC 3.3.1 Error Identification and SC 3.3.3 Error Suggestion) requires errors to appear in a summary at the top of the page and inline at the field. This lets screen-reader users hear the full list before they hit the field, and lets keyboard users jump to the field via a link.
{% from "govuk/components/error-summary/macro.njk" import govukErrorSummary %} {% from "govuk/components/input/macro.njk" import govukInput %} {% if errorList | length %} {{ govukErrorSummary({ titleText: "There is a problem", errorList: errorList }) }} {% endif %} {{ govukInput({ id: "email", name: "email", type: "email", label: { text: "Email address", classes: "govuk-label--m" }, value: values.email, errorMessage: fieldErrors.email }) }}The
errorListentry'shrefmatches
The agent volunteers the summary even when not asked.
docs/spec/PLAN.md "Decisions still required" in the upstream planning repo.docs/requirements/non_goals.md.What SKILL.md sets; muted values are Claude Code's defaults
/defra-shared:defra-accessibilityfrom defra-shared
npx claudepluginhub defra/defra-ai-plugins --plugin defra-shared5 skills in this plugin
/defra-branchingDefra branching strategy — never commit or push directly to main or master. Use a feature branch named for the work, open a pull request, get review, then merge. Use when the agent is about to run git commit, git push, or git checkout, or when a developer asks how to start a piece of work./defra-commit-messagesDefra commit-message format — provisionally Conventional Commits (type(scope) subject + optional body and footers). Subject ≤ 72 chars, imperative mood, no trailing period. Use whenever the agent is about to run git commit -m, draft a commit message for a developer, or review an existing commit message./defra-quality-gatesOther plugins' skills for the same job