-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SC2-4-6-descriptive-labels #71
Comments
I have a few concerns with the applicability:
|
We have based our interpretation on the WCAG 2.0 definition. Is "label" a term that is used in other test rules? Maybe we could reuse an existing definition. |
Can you identify any example of a label element that this would not apply to? How much would be covered by tests for 2.4.4 or 3.3.2? |
Can we use the applicability section to clearly specify which label elements this rule would apply to? |
Suggestion for the applicability: All DOM elements that have an accessible name (computated with the "Accessible name computation" method outlined on the following page: https://www.w3.org/TR/2014/REC-wai-aria-implementation-20140320/#mapping_additional_nd_te) Question: Can we reference such methods or should they be copied into the rule? And if we copy it, should we use the current draft instead? (https://www.w3.org/TR/accname-1.1/#mapping_additional_nd_te) |
Updated with new test rule format and rewritten applicability section. This test rule should be consistent with https://github.com/auto-wcag/auto-wcag/blob/master/_rules/SC2-5-3-label-content-name-mismatch.md |
From WCAG 2.0
|
I would suggest aligning with this rule: https://auto-wcag.github.io/auto-wcag/rules/SC3-3-2-form-field-has-name.html I have tried giving it a shot. Don't know if something like this could work (if it was cleaned up): ApplicabilityThis rule applies to
The form field semantic roles to be considered for this rule are: Note: The list of roles is derived by taking all the ARIA 1.1 roles that:
ExpectationsEach target element describes the element it is an accessible name or HTML |
If we want to move on with the above, I would definitely suggest we create a definition for the form field roles and just link to that instead of listing it in the rule. |
name: Label is descriptive
test_type: atomic
description: |
This rule checks that labels describe the purpose of the interface components.
success_criterion:
test_aspects:
authors:
Test Procedure
Applicability
This rule applies to
<label>
elements andaria labelledby
attributtNote: This rule is only applies to (...markup equivalent to semantic role of label...). Thus, it is a partial check for WCAG 2.0 success criterion 2.4.6, which applies to all labels. "Label" is used in its general sense and includes text or other components with a text alternative that is presented to a user to identify a component within Web content.
Note: A label is presented to all users whereas the name may be hidden and only exposed by assistive technology. In many (but not all) cases the name and the label are the same.
Expectation
Each target element describes the purpose of the element its a caption for.
Note: Labels do not need to be lengthy. A word, or even a single character, may suffice.
Assumptions
There are currently no assumptions.
Accessibility support
There are no major accessibility support issues known for this rule.
Background
Test Cases
Passed
Passed example 1
Label that is coded with the
<label>
element and describes the purpose of the associated element.Failed
Failed example 1
Description...
<!-- code -->
Inapplicable
Inapplicable example 1
Description...
<!-- code -->
The text was updated successfully, but these errors were encountered: