For each image used as a CAPTCHA or as a test image that has a text alternative, does this alternative identify the nature and function of the image?

A blind user arrives at a registration form protected by a visual CAPTCHA. Their screen reader announces "captcha_img_23.png". They don't know what is expected of them. They leave the page. This criterion addresses exactly this situation: when a CAPTCHA image or test image already has a text alternative, that alternative must make it possible to understand the nature of the test and what the user must do.

The rule is simple but often misunderstood. The alternative does not reveal the solution. An alt that would transcribe the distorted characters would circumvent the security mechanism itself. The alternative describes the task, not the answer. "Verification code: enter the characters displayed in the image" is relevant. "CAPTCHA" alone is not, because it does not indicate the expected action.

This criterion covers seven HTML elements capable of displaying a CAPTCHA or test image: <img>, <area>, <input type="image">, <object type="image/…">, <embed type="image/…">, <svg> and <canvas>. Each type has its own alternative mechanism. For <svg> and <canvas>, the alt attribute does not exist: the alternative is provided through aria-label, aria-labelledby or a child <title> element.

Final clarification: criterion 1.4 only applies if the image already has an alternative. If the alt attribute is missing on a CAPTCHA <img>, it is criterion 1.1 that fails. Proposing a different sensory alternative (audio, logical question) falls under criterion 1.5, not this one.

7 tests to check the accessibility of CAPTCHAs and test images

CAPTCHA alternative <img>

  1. Identify all <img> elements used as CAPTCHA or test images on the page.
  2. Filter those that already have a non-empty, non-absent alt.
  3. For each: verify that the alternative describes the nature of the test (security verification) and the expected action (e.g., "enter the displayed characters"), without revealing the solution.
  4. Test passed if all alternatives are relevant. A single inadequate alt invalidates the test.

CAPTCHA alternative <area>

  1. Identify all <area> elements (clickable regions of image maps) used as CAPTCHA or test images.
  2. Filter those that have a populated alt attribute.
  3. For each: verify that the alternative describes the nature and function of the test, not a generic label like "image" or "zone".
  4. Test passed if all alternatives are relevant.

CAPTCHA alternative <input type="image">

  1. Identify all <input type="image"> elements used as CAPTCHA or test images.
  2. Filter those that have a populated alt attribute (non-empty).
  3. For each: verify that the alternative describes the nature of the test and the expected action, without revealing the answer.
  4. Test passed if all alternatives are relevant.

CAPTCHA alternative <object>

  1. Identify all <object type="image/…"> elements used as CAPTCHA or test images.
  2. Filter those that have a text alternative: text content inside the element, aria-label, or aria-labelledby.
  3. For each: verify that the alternative clearly identifies the nature and function of the test.
  4. Test passed if all alternatives are relevant.

CAPTCHA alternative <embed>

  1. Identify all <embed type="image/…"> elements used as CAPTCHA or test images.
  2. Filter those that have a text alternative (aria-label or aria-labelledby, since <embed> has no alt attribute).
  3. For each: verify that the alternative describes the nature and function of the test.
  4. Test passed if all alternatives are relevant.

CAPTCHA alternative <svg>

  1. Identify all <svg> elements used as CAPTCHA or test images on the page.
  2. Filter those that have a text alternative: <title> as first child, aria-label or aria-labelledby on the <svg>.
  3. For each: verify that this alternative describes the nature and function of the test, without revealing the solution.
  4. Test passed if all alternatives are relevant.

CAPTCHA alternative <canvas>

  1. Identify all <canvas> elements used as CAPTCHA or test images.
  2. Filter those that have a text alternative (aria-label, aria-labelledby, or text content child of the <canvas>).
  3. For each: verify that the alternative describes the nature of the test and the expected action, without revealing the solution.
  4. Test passed if all alternatives are relevant.

Examples

❌ Non-compliant : CAPTCHA with a filename or generic alt

<img src="captcha_v2.png" alt="captcha">

The alternative "captcha" does not tell the user what they must do. A screen reader announces "image, captcha". The user understands there is a test, but doesn't know whether they must enter characters, solve a calculation, or click something. The function is not identified.

✅ Compliant : CAPTCHA with a relevant alt

<img src="captcha_v2.png" alt="Verification code: retype the characters displayed in the field below">

The alternative describes the nature of the test (security verification code) and the expected action (retype the characters in the field). It does not reveal the solution. A user who cannot see the image understands exactly what is being asked of them and can look for an audio alternative version if one exists.

❌ Non-compliant : CAPTCHA reload button without alternative

<input type="image" src="reload-captcha.png" alt="">

An empty alt on an <input type="image"> used as a functional button is non-compliant. The screen reader completely ignores the button: the user cannot regenerate the verification code if they cannot distinguish it. An empty alt is reserved for decorative elements, not interactive controls.

✅ Compliant : CAPTCHA SVG with relevant aria-label

<svg role="img" aria-label="Security test: retype the five digits displayed to validate your registration" width="200" height="60">
  <title>Security test: retype the five digits displayed</title>
  <!-- captcha visual rendering -->
</svg>

The <svg> does not accept the alt attribute. The alternative is provided here through aria-label and a child <title> element. Both describe the function of the test without revealing the solution. Adding role="img" improves compatibility with assistive technologies that do not spontaneously expose the <title> of an SVG.

Tips and pitfalls

⚠️ Putting the solution in the alt

This is the error that invalidates both security and the audit: alt="4B7K2" on a CAPTCHA. A bot reading the HTML gets the answer for free. The correct alternative describes the task: "Enter the five characters displayed in the image". WCAG technique G143 confirms this explicitly: identify the function, not transcribe the content.

⚠️ Confusing absence of alternative with irrelevant alternative

Criterion 1.4 only applies if the image already has a text alternative. If the alt is missing on a CAPTCHA <img>, it is criterion 1.1 that fails. In an audit: note the non-compliance under 1.1, not under 1.4. Both problems often coexist on the same page.

💡 Criterion 1.4 ≠ criterion 1.5: two distinct requirements

Criterion 1.4 verifies the relevance of the text alternative when it exists. Criterion 1.5 verifies that the site provides an alternative modality (audio CAPTCHA, logical question) for users unable to solve the visual test. A CAPTCHA can have good alt text (1.4 compliant) without any sensory alternative (1.5 non-compliant).

⚠️ The test image is not limited to distorted text CAPTCHA

A test image can be a visual puzzle, a grid "select the traffic lights", a QR code for validation, or any image serving to distinguish human from robot. As soon as the image plays this verification role, the rules of criterion 1.4 apply to its text alternative.

⚠️ WCAG acknowledges that CAPTCHA cannot be fully accessible

WCAG technique G143 explicitly admits that it is impossible to reveal the solution in the alternative for security reasons. The only requirement is to identify the function. This is why criterion 1.5 separately requires a different perceptual alternative. The two criteria are complementary; neither alone makes the visual CAPTCHA fully accessible.

Frequently asked questions

How do you make a CAPTCHA accessible without exposing its solution in the alt attribute?

No, and it is forbidden for security reasons. The alternative describes the nature and function of the test, not the answer. "Enter the characters displayed in the image" is compliant. To make the CAPTCHA truly usable by blind people, criterion 1.5 requires a separate sensory alternative (audio version, logical question).

What is the difference between RGAA criteria 1.4 and 1.5 regarding CAPTCHA?

Criterion 1.4: if the CAPTCHA has a text alternative, is it relevant? Criterion 1.5: does the site provide another modality of access (audio, logical question) for users who cannot solve the visual test? These are two separate audits. A page can pass 1.4 and fail 1.5.

How do you audit the accessibility of a CAPTCHA rendered as inline SVG?

The alt attribute does not exist on <svg>. Check for the presence of a <title> as first child, an aria-label or an aria-labelledby on the <svg>. If none of these mechanisms are present, the alternative is absent (criterion 1.1 fails). If one is present, evaluate its relevance under criterion 1.4.

Why does the alt="CAPTCHA" attribute not meet RGAA accessibility requirements?

No. The word alone does not indicate what the user must do. The alternative must describe the expected action: "Security code: retype the characters displayed in the field below". Without this precision, the screen reader just announces "CAPTCHA" and the user does not know how to interact.

How does RGAA criterion 1.4 apply to CAPTCHA without a text alternative?

It does not. Criterion 1.4 is conditional: it is interested in images "having a text alternative". If there is no alternative, it is criterion 1.1 that fails. In practice, both non-compliances frequently coexist: absent alt (1.1) and, when present, irrelevant (1.4).

References