Labels describe the purpose of the inputs they are associated with.
WCAG 2 criterion
2.4.6 Headings and Labels (Level AA)
Tools and requirements
Test procedure
During manual evaluation of forms, observe all of the labels present on the page. Ensure that the label name is descriptive and properly describes the purpose of the input field.
Note that if a form field's accessible name is descriptive (using aria-label or similar) but the visual label is not, it is still a failure of this criterion.
AI Prompt
Copy to Clipboard
Create a PHP class in the namespace "App\Services\AccessibilityAnalyzer\GuidelineRules"
that extends "App\Services\AccessibilityAnalyzer\GuidelineRuleRunner" and is called "Guideline61" that has a function with the signature "protected function findApplicableElements(Crawler $crawler): Crawler". The base class includes the function "protected function isElementIncludedInAccessibilityTree(\DOMNode $element): bool" for determining if an element is included in the accessibility tree.
Web accessibility guideline:
## Labels describe the purpose of the inputs they are associated with.
### WCAG 2 criterion
2.4.6 Headings and Labels (Level AA)
### Tools and requirements
* Manual Assessment
### Test procedure
During manual evaluation of forms, observe all of the labels present on the page. Ensure that the label name is descriptive and properly describes the purpose of the input field.
Note that if a form field's accessible name is descriptive (using aria-label or similar) but the visual label is not, it is still a failure of this criterion.