All subjects · Information Technology · WIT12 3 hour practical exam on web development with HTML, CSS and JavaScript

Accessibility and the Web Content Accessibility Guidelines (WCAG)

Edexcel IAL Information Technology · WIT12 3 hour practical exam on web development with HTML, CSS and JavaScript

An accessible site can be used by everyone, including people with visual, hearing, motor and cognitive impairments. The specification refers to the W3C's Web Content Accessibility Guidelines (spec 10.2.1).

Practise this in the app: instant marking and a fix for every mistake. Free, no email needed to start.

Practise this lesson

WCAG in outline

WCAG is published by the World Wide Web Consortium (W3C); version 2.2 is current. It is organised under four principles (POUR):

Each success criterion has a conformance level: A (minimum), AA (the usual target in law and policy) or AAA (highest).

Key success criteria

CriterionLevelWhat to do
1.1.1 Non-text contentAGive images alt text; decorative images alt=""
1.2.2 CaptionsACaption pre-recorded video
1.3.1 Info and relationshipsAUse semantic headings, lists, table headers and form labels
1.4.1 Use of colourADo not use colour as the only way to give information (add text or icons to red error fields)
1.4.3 Contrast (minimum)AAText contrast at least 4.5:1; large text at least 3:1
1.4.4 Resize textAAContent still usable when zoomed to 200%
2.1.1 KeyboardAEverything works with a keyboard alone
2.4.2 Page titledAEvery page has a descriptive title
2.4.4 Link purposeALink text makes its purpose clear
2.4.7 Focus visibleAAKeyboard focus is clearly visible
3.1.1 Language of pageADeclare the language (lang)
3.3.1 and 3.3.2 Errors, labelsALabel inputs; identify errors clearly in text

Source: WebAIM's WCAG 2.2 checklist

Contrast

Contrast ratio compares the lightness of text and background, from 1:1 (same colour) to 21:1 (black on white). Level AA needs 4.5:1 for normal text and 3:1 for large text (18 point, or 14 point bold, roughly 24px or 18.7px bold). Level AAA needs 7:1 and 4.5:1. Logos are exempt. Check colours with a contrast checker tool; pale grey text on white usually fails.

Accessible code

<html lang="en">
<body>
  <a href="#main">Skip to main content</a>
  <nav>...</nav>
  <main id="main">
    <h1>Book a class</h1>
    <img src="images/yoga.jpg" alt="Instructor leading a yoga class">
    <label for="mail">Email (required)</label>
    <input type="email" id="mail" name="mail" required>
    <p id="err">Please enter an email address, for example name@example.com</p>
  </main>
</body>
</html>

Also: use real buttons and links (keyboard accessible by default), keep a visible focus outline, use relative font sizes so text can be enlarged, caption videos and avoid content that flashes more than three times a second.

Worked example

A form shows invalid fields only with a red border. Which WCAG principle and criterion does this fail, and how should it be fixed?

  1. Users who cannot distinguish red do not know which field is wrong: colour is the only cue.
  2. This fails 1.4.1 Use of colour (Perceivable), and 3.3.1 Error identification.
  3. Fix: add a text message next to the field, such as 'Please enter your age', and possibly an icon.

Answer: Add a text error message as well as the colour.

Key idea: WCAG (W3C, version 2.2) has four principles: Perceivable, Operable, Understandable, Robust, and levels A, AA, AAA. Key needs: alt text, captions, semantic structure, 4.5:1 text contrast (3:1 large), keyboard access, visible focus, labels and text error messages, a declared language.

Check yourself

  1. Which of these is one of the four WCAG principles?
    • Responsive
    • Operable
    • Efficient
    • Attractive
    Show answer

    Operable. Perceivable, Operable, Understandable, Robust.

  2. What minimum contrast ratio does WCAG level AA require for normal-sized body text? Give the first number of the ratio (the x in x:1).
    Show answer

    4.5. Level AA (1.4.3) requires at least 4.5:1 for normal text, and 3:1 for large text.

  3. A chart shows profit in green and loss in red with no other labels. Which accessibility problem does this cause?
    • The contrast is too high
    • Colour is the only way the information is given, so colour-blind users may not understand it
    • The chart cannot be printed
    • Screen readers cannot read the colour green
    Show answer

    Colour is the only way the information is given, so colour-blind users may not understand it. WCAG 1.4.1: do not rely on colour alone; add labels or patterns.

  4. A user who cannot use a mouse navigates with the Tab key. Which WCAG requirement matters most?
    • Images have captions
    • The text is at least 4.5:1 contrast
    • All functionality is available from a keyboard, with a visible focus indicator
    • The page has a description meta tag
    Show answer

    All functionality is available from a keyboard, with a visible focus indicator. 2.1.1 Keyboard and 2.4.7 Focus visible.

  5. Explain how captions on a video improve accessibility.
    Show answer

    Deaf or hard of hearing users can read the speech and important sounds as text, so they can understand the video.. Captions give a text version of speech and important sounds for deaf and hard of hearing users (and anyone watching without sound).

  6. Which WCAG conformance level is the usual target for public websites and most accessibility laws?
    • A
    • AAA
    • AA
    • AAAA
    Show answer

    AA. AA is the common target; AAA is not required for whole sites.

  7. Under WCAG, what counts as large text for contrast purposes?
    • At least 18 point, or 14 point bold
    • Any heading
    • At least 12 point
    • Any text in capital letters
    Show answer

    At least 18 point, or 14 point bold. Large-scale text is 18 point or larger, or 14 point bold or larger.

  8. What is the purpose of a 'Skip to main content' link at the top of a page?
    • It hides the navigation for everyone
    • Keyboard and screen reader users can jump past the navigation straight to the content
    • It improves the page's contrast
    • It reloads the page
    Show answer

    Keyboard and screen reader users can jump past the navigation straight to the content. It saves keyboard users tabbing through every menu link on each page.

Practise with instant feedback

Sources

Last updated 8 November 2026. Spotted a mistake? Tell us.