WCAG for Developement

A blue square with sunglasses and a mouth. It has a mouse and a keyboard in its hand. It symbolises developers.

Filter:

The WCAG criteria

Short description:

CAPTCHAs require alternatives. An audio CAPTCHA must have an image CAPTCHA as an option, and vice versa. Image-based CAPTCHAs should also include text in the alt attribute that explains the purpose of the CAPTCHA.

 

Illustration showing two CAPTCHA types side by side. On the left is an image CAPTCHA with distorted characters and a field labeled ‘Write your answer’. On the right is an audio CAPTCHA with playback controls and its own answer field. Labels point out ‘Image-CAPTCHA’ and ‘… and an alternative!’, emphasizing that CAPTCHAs must provide both image and audio options and that image CAPTCHAs need alt text explaining their purpose.

Short description:

Graphical controls, such as clickable icons or images, need a name so that screen reader users can understand their function. This can be provided, for example, through the alt attribute or an aria-label.

 

Illustration comparing an unnamed back-arrow icon button with a properly labeled one. The first version has an empty aria-label and is marked wrong. The second version uses aria-label='Back' and is marked correct, showing that graphical controls like icons need a programmatic name so screen reader users understand their function.

Short description:

The label (<label>) for form fields (<input>) should include a »for« attribute to link the label to the input. This gives the field an accessible name. It’s not the only way to do this, but the best one!

 

Illustration of a contact form showing an input field for first name. Above it is the field’s label, which is programmatically linked to the input using the HTML for attribute.

Short description:

Headings must be properly marked up in HTML using <h1> to <h6>. They should also follow a logical order, for example, an <h3> should appear above an <h1>.

 

Three headings are shown in the correct order: an H1 followed by an H2 and an H3.

Short description:

If a website uses HTML tables purely for layout purposes, semantic elements like <table>, <th>, and <td> shouldn’t be used, so that screen readers don’t interpret them as data tables.

 

Illustration of a layout built using a table structure, with the HTML markup crossed out to show that table-based layout must not be used.

Short description:

Content that visually appears as a list must also be marked up as a list in HTML. Use <ul>, <ol>, or <dl> depending on the type of list.

 

Example of an unordered list with the correct HTML elements.

Short description:

For paragraphs and formatted text, such as bold or italic, the correct HTML tags must be used. Line breaks in continuous text should not be created using double <br> tags.

 

Example of a paragraph, hat includes a phrase that is marked with the html strong element

Short description:

Standalone quotes must be marked up using <blockquote>. These can include, for example, individual customer feedback on a website. Quotes within paragraphs don’t necessarily require special markup.

 

Illustration of a character saying: If you share what I wrote, don’t forget to use blockquote! The quoted text is shown inside an HTML blockquote element.

Short description:

Table headers must be marked up with <th> and the content with <td>. For complex tables with multiple headers, the scope attribute should also be used to clarify the relationships.

 

Illustration of a table with both column headers at the top and row headers on the left. The HTML attributes needed for proper association are shown: scope='col' for column headers and scope='row' for row headers.

Short description:

Information presented visually in a table must also be marked up as a table in HTML. This enables assistive technologies to interpret the content correctly.

 

Illustration of a table with a header row, showing the correct HTML elements (caption, th and td) needed to mark up the table header.

Short description:

The visual layout of a website using CSS must not affect the logical order of content. Related elements, such as a heading and its accompanying text, must be read in the correct order by screen readers.

 

Illustration showing the correct reading order of a webpage: first the heading, then the text below it, then the image, and finally the extended image description.

Short description:

A website must be usable in both portrait and landscape orientations. Users should be able to switch between orientations without any restrictions.

 

Two illustrations of a smartphone, one in portrait orientation and one in landscape. Each shows a contact form whose layout changes depending on how the phone is held.

Short description:

When users need to enter personal data, such as name, address, or password, form fields must have the correct autocomplete attribute. For example, for the »first name« field u should use: autocomplete=”given-name”.

 

Illustration of a personal data form showing two input fields, one for name and one for credit card number. Below each field is the corresponding autocomplete attribute with the correct value for that field.

Short description:

A website must function correctly at a width of 320 px (or 400% zoom at 1280 px), ensuring that all content and functionality are preserved and text doesn’t require horizontal or vertical scrolling.Deine Website muss auch bei 320 px Breite (oder 400 % Zoom bei 1280 px) so funktionieren, dass alle Inhalte und Funktionalitäten erhalten bleiben und Texte nicht horizontal und vertikal gescrollt werden müssen.

 

Text that reflows correctly when zoomed in.

Short description:

If users increase line height, paragraph spacing, letter spacing, or word spacing, the text must remain fully visible and legible, without being cut off or obscured.

 

Two violations of the criterion: in one case, text is simply cut off, and in the other, it overlaps with other text.

Short description:

Elements that appear on focus or hover, such as submenus, should be closable using the ESC key. They must not close automatically after a set time or while the mouse is hovering over them.

 

Illustration of a webpage with an open submenu. Labels indicate that the submenu does not close on its own, does not close while the mouse is hovering over it, and can be closed without shifting focus using the ESC key or the button that opened it. This visual supports the requirement that hover- or focus-triggered elements must remain open until the user actively closes them.

Short description:

If your website automatically plays audio for more than three seconds, a way to stop or mute the sound must be provided.

 

Illustration of a webpage with an audio banner showing a speaker icon, the text 'Audio is playing on the website!', and a large pause button. A note with an arrow says 'But you can stop it!'.

Short description:

Users must be able to zoom in up to 200% without text or other content being hidden, and all essential website functions must remain fully operable.

 

Illustration showing a webpage before and after zooming in to 200 percent. In the zoomed view, the heading, text, button, and graphical elements remain visible and usable, demonstrating that content and functionality must stay accessible when users zoom in.

Short description:

A website must be fully operable with a keyboard. All content should be accessible, and all essential functions must be usable without a mouse.

 

Ilustration of a keyboard

Short description:

If an element can receive keyboard focus, it must also be possible to move the focus away using the keyboard. Users should be able to exit the element with Tab, arrow keys, ESC, or Enter.

 

Illustration showing the Tab key, arrow keys, and the Enter key, all crossed out to indicate they cannot be used to exit the focused element.

Short description:

If your website uses single-character keyboard shortcuts (letters, numbers, or special characters), they should be customizable or able to be disabled.

 

Illustration of the keys S, Z, and M, each labeled with the shortcut function they trigger, alongside a toggle switch to turn the shortcuts on or off.

Short description:

Time limits on a page must be adjustable or turnable off. Users shouldn’t be logged out automatically without a warning or the option to extend the time.

 

Illustration of an online banking page showing a countdown labeled “Remaining time: 0:21.” A large warning dialog appears stating, “Warning: You will be logged out in 20 seconds!” with two buttons: “Give me more time” and “Okay.”

Short description:

Automatically starting animations lasting longer than 5 seconds must be pausable, stoppable, or able to be hidden.

 

Illustration of a slider on a webpage that includes a pause button to stop the automatic sliding.

Short description:

A website should not include elements that flash more than three times per second, such as rapidly blinking GIFs or flickering videos. Flashing elements that are small enough (around 148×148 px) are considered acceptable.

 

Illustration of a triangular character with swirling eyes and shaking arms, suggesting dizziness from rapid flashing.

Short description:

A website must allow users to skip repetitive sections, such as headers and footers. This can be achieved using hidden skip links or HTML landmarks.

 

A skip link displayed in the header that lets users jump directly to the main content.

Short description:

Interactive elements must not be fully covered by other content when focused via the keyboard. For example, sticky headers, dropdown menus, or dialogs shouldn’t entirely obscure the focused element.

 

Illustration of a webpage with a large sticky header labeled Sticky Header is covering Button. The button beneath is partially hidden. A note reads Only a fail, if focus state is completely covert.

Short description:

Each subpage must have a meaningful HTML title that can be easily identified in the browser. The title should include both the page name and the website name.

 

Example of a document title showing the current page name followed by the website name.

Short description:

Users must be able to navigate a website’s content using the keyboard (Tab key) in a logical order. The tab order should generally follow the visual layout.

 

Illustration einer Webseite mit nummerierten Fokus-Stationen: Zuerst wird das Logo fokussiert, danach die Navigation, dann der Button.

Short description:

Subpages of your website must be accessible in multiple ways. In addition to navigation menus, provide options such as a search function or a sitemap.

 

Illustration of a menu icon paired with a magnifying glass icon, and below it another menu icon paired with a sitemap icon.

Short description:

Interactive elements, such as buttons and links, must have a visible focus state. A recommended approach is a two-colored focus outline, with white and black lines, ensuring it is clearly visible on all backgrounds.

 

Illustration of two buttons: the first shows a visible focus outline, and the second has no focus outline, indicating an accessibility error.

Short description:

Every function on a website must be operable with a simple input. More complex gestures, like swiping or multi-finger actions, must have an alternative that can be activated with a single-pointer action, such as a clickable button.

 

Illustration of a smartphone showing a supposedly sexy triangle. Above it is the text *Swipe left or right! Below are two buttons representing Yes and No. A note explains that swipe actions are only accessible if there are clickable button alternatives.

Short description:

Pressing and holding a button or link, with a mouse or finger, must not trigger an action immediately. The action should only occur on release, allowing it to be canceled if needed.

 

Illustration showing two versions of a Send button. The first button simply reads Send. The second shows Send pressed with a finger icon pressing down on it. A note with a checkmark explains: Don’t trigger the action on press-and-hold; trigger it only on release.

Short description:

Functions triggered by device motion must also be operable with a simple input, such as a click, touch, or Enter key. Additionally, users must be able to disable motion-based activation.

 

Illustration of a smartphone being shaken to trigger an action. Next to it is a plus icon and a button that provides the same action without requiring the shake gesture.

Short description:

If functions on a website can only be triggered via drag-and-drop gestures, they must have an alternative that can be activated with a single-pointer action, such as a clickable button.

 

Example of a file upload field that allows users to drag and drop a file, along with an alternative button for uploading a file manually.

Short description:

The <html> tag must include a »lang« attribute specifying the page’s language. This helps assistive technologies render the page correctly and supports automatic browser translation.

 

Illustration of the HTML tag with the language attribute set to German for Germany.

Short description:

Setting keyboard focus on an element must not trigger any unexpected action. Functions should only be executed through an explicit action, such as pressing Enter or clicking with a mouse.

 

The submit button of a contact form is focused, but the form must not be submitted just because it received focus.

Short description:

Interacting with a form element, such as a checkbox, must not cause an unexpected change in context, like a shift in keyboard focus. Context changes are allowed only if the user has been warned in advance.

 

Illustration of a checkbox that triggers unexpected context changes when clicked, such as shifting focus or opening a new tab.

Short description:

If errors occur on a website, they should be easy to identify and not indicated by color alone. Text describing the error must also be provided.

 

A form that displays an error message as text.

Short description:

Form fields should include a clearly visible label, ideally using the <label> tag. This label should always remain visible and not disappear. Placeholder text by itself is not an adequate substitute for a proper label.

 

Two form fields are shown: the first has no label, while the second includes a proper label.

Short description:

Error messages should be as specific as possible, providing clear guidance to help users understand and fix the issue.

 

Illustration of a password change form with an incorrectly entered password. Below it is an error message that says: Password too short. It must be at least 12 characters long!

Short description:

To prevent errors during important interactions or transactions, users should have the opportunity to review their data before sending. Alternatively, they should be able to confirm the action again or have the option to undo it.

 

Modal dialog stating: *You have successfully transferred 1 million to Gehirngerecht.* Below are two buttons: the left one allows undoing the action, and the right one confirms it with *They deserve it!*

Short description:

Users should only need to enter their data once. If the same information is required again, the website should automatically populate it or make it easy to reuse (for example, using the delivery address as the billing address).

 

Illustration of a shipping-address form with fields for name and street, plus a checked option reading Billing address same as shipping address, showing that repeated information should be reused automatically.

Short description:

When users need to verify their identity, the process should be smooth and not feel like a test of their memory or mental effort. Copying and pasting information, as well as using password managers, should work seamlessly.

 

Login form where users can fill in their data via copy-paste or a password manager.

Short description:

All interactive elements on a website must be coded in a way that allows assistive technologies to identify their name, role, and current value. Any changes to these attributes should also be communicated.

 

Illustration of a checkbox alongside its accessibility tree output, showing its name, role, and current state.

Short description:

When websites display status messages or notifications, they should be automatically announced by screen readers without shifting the user’s focus. This can be achieved using ARIA live regions.

 

A status message that is announced by a screen reader.

Choose your role:

Back to all WCAG criteria