Documentation Index
Fetch the complete documentation index at: https://anvil.servicetitan.com/llms.txt
Use this file to discover all available pages before exploring further.
Purpose of These DocsThese docs are meant as a starting point for using Anvil2 accessibly. While the contents can contribute to building accessible interfaces from scratch, that is not the main goal.
Overview
Directly Related WCAG Guidelines(s):- 1.1.1 Non-text Content (Level A)
- 1.3.1 Info and Relationships (Level A)
- 2.4.6 Headings and Labels (Level AA)
- 2.5.3 Label in Name (Level A)
- 3.2.4 Consistent Identification (Level AA)
- 3.3.2 Labels or Instructions (Level A)
- 4.1.2 Name, Role, Value (Level A)
| Anvil2 Responsibility | Implementor Responsibility |
|---|---|
| Anvil2 ensures built-in components maintain proper associations between input fields and labels along with built-in error states along with creating proper focus and action states. | Implementors must implement proper labeling by writing clear, descriptive labels/CTA text, providing necessary instructions, along with implementing error states. |
Input Field Context Association
Directly Related WCAG Guidelines(s):- 1.3.1 Info and Relationships (Level A)
- 2.4.6 Headings and Labels (Level AA)
- 3.3.2 Labels or Instructions (Level A)
- 4.1.2 Name, Role, Value (Level A)
| Anvil2 Responsibility | Implementor Responsibility |
|---|---|
Anvil2 ensures components with proper label association using the for attribute and error handling management. | Implementors ensure they are writing clear and specific labels as well as help text and that they are handling the error messages properly. |
Best Practices
- Always associate labels with input fields using the
forandidattributes - Write clear, specific labels rather than generic terms
- Provide additional context when needed through help text or instructions
- Mark required fields clearly and consistently (e.g., “Email address (required)“)
Common Pitfalls
- Using placeholder text instead of labels, which is insufficient for accessibility
- Using vague or overly generic labels like “Name” instead of “Full name” or “Last name” that create ambiguity
- Leaving required field indicators visually obvious but programmatically unclear
Buttons and Links
Directly Related WCAG Guidelines(s):- 1.3.1 Info and Relationships (Level A)
- 2.4.4 Link Purpose (In Context) (Level A)
- 2.4.9 Link Purpose (Link Only) (Level AAA)
- 2.5.3 Label in Name (Level A)
- 3.2.4 Consistent Identification (Level AA)
- 4.1.2 Name, Role, Value (Level A)
| Anvil2 Responsibility | Implementor Responsibility |
|---|---|
| Anvil2 ensures that there are appropriate components to cover functionality. Links behave as links, buttons behave as buttons, etc. Focus states, hover states, and active states are all established. | Implementors ensure proper semantic usage, writing descriptive link and button text, they should also be using the correct components for the application that is needed. |
Best Practices
- Write descriptive, clear call to action text that explains what will happen when activated
- Provide
aria-labelattributes with additional context for icon-only buttons or short link text like “Read More” - Ensure icon buttons have accessible names even when icons aren’t visible to screen readers
Common Pitfalls
- Using vague language like “Click here” or “Learn more” without additional context
- Assuming icons alone convey meaning to all users
- Omitting alternative text or ARIA labels for interactive elements