WCAG provides recommendations for making web content more accessible.
```
--------------------------------
### PDF Technique for Passage Language
Source: https://www.w3.org/WAI/WCAG21/quickref
Explains how to specify the language for a specific passage or phrase within a PDF document using the 'Lang' entry, supporting WCAG Success Criterion 3.1.2.
```pdf
/Lang (fr)
% ... text content for the passage ...
```
--------------------------------
### WCAG 2.1 Technique: G19 - No Flashing
Source: https://www.w3.org/WAI/WCAG21/quickref
Ensures that no component of the content flashes more than three times in any 1-second period. This is a general technique for managing temporal visual patterns.
```general
G19: Ensuring that no component of the content flashes more than three times in any 1-second period
```
--------------------------------
### WCAG 4.1.2 Failures: UI Control Accessibility
Source: https://www.w3.org/WAI/WCAG21/quickref
Common failures related to WCAG 2.1 Success Criterion 4.1.2 (Name, Role, Value), highlighting issues with custom controls, missing accessible names, and focus state determinability.
```APIDOC
F59: Failure of SC 4.1.2 - Scripted div/span as UI Control
- Description: Using `` or `
` as a user interface control without providing a `role` attribute.
- Impact: Assistive technologies cannot identify the element's purpose or functionality.
- Fix: Assign an appropriate ARIA `role` (e.g., `role="button"`, `role="checkbox"`).
F15: Failure of SC 4.1.2 - Incomplete Accessibility API Implementation
- Description: Custom controls do not use or incompletely use an accessibility API.
- Impact: Assistive technologies cannot access or interact with custom controls correctly.
- Fix: Ensure custom controls expose their name, role, and state via the platform's accessibility API or ARIA.
F68: Failure of SC 4.1.2 - Missing Programmatically Determined Name
- Description: A user interface control lacks a name that can be programmatically determined.
- Impact: Users cannot identify the purpose of the control.
- Fix: Provide an accessible name using methods like `aria-label`, `aria-labelledby`, or by associating a visible label with the control.
F79: Failure of SC 4.1.2 - Undeterminable Focus State or No Change Notification
- Description: The focus state of a UI component is not programmatically determinable, or changes to focus state are not notified.
- Impact: Users may not know which element has focus or when focus changes.
- Fix: Ensure focus states are managed and communicated, potentially using ARIA attributes or by managing focus programmatically.
F86: Failure of SC 4.1.2 - Missing Names for Multi-part Form Fields
- Description: Each part of a multi-part form field (e.g., US telephone number with separate fields for area code, prefix, line number) does not have a programmatically determinable name.
- Impact: Users cannot associate labels with individual parts of the composite field.
- Fix: Use `aria-labelledby` to associate a common label with each part, or provide individual labels.
F89: Failure of SC 2.4.4, 2.4.9, 4.1.2 - Image-Only Link Without Accessible Name
- Description: An image is the sole content of a link, but it lacks an accessible name.
- Impact: Users cannot understand the purpose of the link.
- Fix: Provide an `alt` attribute for the image or use `aria-label` on the link.
F111: Failure of SC 1.3.1, 2.5.3, 4.1.2 - Visible Label, No Accessible Name
- Description: A control has visible label text, but no accessible name is programmatically determined.
- Impact: Assistive technologies cannot reliably associate the visible label with the control.
- Fix: Ensure the visible label is correctly associated with the control using `for`/`id` attributes or ARIA attributes.
```
--------------------------------
### G101: Providing definitions for unusual words/phrases
Source: https://www.w3.org/WAI/WCAG21/quickref
This general technique covers providing definitions for words or phrases used in an unusual or restricted way, including idioms and jargon. It is a sufficient technique for WCAG 2.1 Success Criterion 3.1.3 (Unusual Words).
```general
Technique G101: Providing the definition of a word or phrase used in an unusual or restricted way
Purpose: To make specific definitions of words or phrases available when they are used in an unusual or restricted way, including idioms and jargon.
Applicability:
- Situation A: If the word or phrase has a unique meaning within the web page.
- Situation B: If the word or phrase means different things within the same web page.
Implementation Methods:
- Linking to definitions (G55)
- Using inline definitions (G112)
- Providing a glossary (G62)
- Providing a function to search an online dictionary (G70)
Related Techniques:
- G55: Linking to definitions
- G112: Using inline definitions
- G62: Providing a glossary
- G70: Providing a function to search an online dictionary
- H40: Using description lists (HTML)
- H54: Using the dfn element to identify the defining instance of a word (HTML)
```
--------------------------------
### PDF Technique for Default Page Language
Source: https://www.w3.org/WAI/WCAG21/quickref
Details how to set the default language for a PDF document using the '/Lang' entry in the document catalog, fulfilling WCAG Success Criterion 3.1.1.
```pdf
/Lang (en)
% ... document catalog entries ...
```
--------------------------------
### HTML Technique for Language of Page
Source: https://www.w3.org/WAI/WCAG21/quickref
Specifies the use of the 'lang' attribute on the HTML element to programmatically determine the default human language of a web page, as per WCAG Success Criterion 3.1.1.
```html
```
--------------------------------
### PDF19: Specifying language in PDF documents
Source: https://www.w3.org/WAI/WCAG21/quickref
This technique explains how to specify the human language for a passage or phrase within PDF documents using the 'Lang' entry. It is a sufficient technique for WCAG 2.1 Success Criterion 3.1.2 (Language of Parts).
```APIDOC
PDF Document Language Specification:
Method: SetLangEntry
Description: Specifies the human language for a passage or phrase within a PDF document.
Parameters:
- LangEntry (string): The language code (e.g., 'en-US', 'fr-CA') for the text passage.
Usage:
Apply the LangEntry to the relevant text block or annotation within the PDF structure.
Example:
// Conceptual representation of setting language for a text block
pdfDocument.addText("This is English.", { lang: "en-US" });
pdfDocument.addText("Ceci est en français.", { lang: "fr-FR" });
Related Techniques:
- H58: Using language attributes to identify changes in the human language (HTML)
```
--------------------------------
### H58: Using language attributes in HTML
Source: https://www.w3.org/WAI/WCAG21/quickref
This technique describes how to use the `lang` attribute in HTML to identify changes in the human language of content. It is a sufficient technique for WCAG 2.1 Success Criterion 3.1.2 (Language of Parts).
```html
This is English.
Ceci est en français.
This is English again.
```
--------------------------------
### WCAG 4.1.3 Status Messages: ARIA Roles
Source: https://www.w3.org/WAI/WCAG21/quickref
Details on using ARIA roles to convey status messages, including success/results, errors/warnings, and progress updates, as per WCAG 2.1 Success Criterion 4.1.3.
```APIDOC
ARIA22: Using role=status to present status messages
- Purpose: To present status messages that advise on the success or results of an action, or the state of an application.
- Usage: Apply `role="status"` to an element that will contain status messages.
- Example:
Your form was submitted successfully.
- Related Techniques: G199 (Providing success feedback when data is submitted successfully).
ARIA19: Using ARIA role=alert or Live Regions to Identify Errors
- Purpose: To convey suggestions or warnings on the existence of an error, ensuring assistive technologies can present them.
- Usage: Use `role="alert"` for critical, time-sensitive messages, or live regions for less urgent notifications.
- Example (alert):
Please enter a valid email address.
- Example (live region):
Your changes have been saved.
- Related Techniques: G83, G84, G85, G177, G194 (Various techniques for providing error descriptions and suggestions).
- Note: `role="alert"` is primarily for changes of context that do not take place.
ARIA23: Using role=log to identify sequential information updates
- Purpose: To present sequential information updates, such as chat messages or progress logs.
- Usage: Apply `role="log"` to an element that will contain a series of updates.
- Example:
New message from John: Hello there!
Using role="progressbar"
- Purpose: To indicate the progress of an operation, such as a file upload or download.
- Usage: Apply `role="progressbar"` to an element representing progress, often with `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` attributes.
- Example:
75% complete
- Related Techniques: G193 (Providing help by an assistant in the web page).
```
--------------------------------
### WCAG 2.1 Technique: C39 - CSS reduce-motion
Source: https://www.w3.org/WAI/WCAG21/quickref
Uses the CSS 'prefers-reduced-motion' media query to prevent or reduce animations triggered by user interactions. This technique is crucial for users sensitive to motion.
```css
C39: Using the CSS reduce-motion query to prevent motion
```