Skip to content
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

Visible label is part of accessible name indicates that inputs are not applicable because the label is not contained in the input #1500

Open
mraccess77 opened this issue Nov 5, 2020 · 5 comments
Assignees

Comments

@mraccess77
Copy link

The rule for visible label https://act-rules.github.io/rules/2ee8b8 seems to indicate that this test is applicable to inputs as the visible label is not contained within it. If I understand that correctly that seems to contradict the intention of SC 2.5.3 Label in Name which applies to user interface elements.

@carlosapaduarte
Copy link
Member

Hey @mraccess77 ! The visible label rule does not apply to <input> elements, because they are not widgets that support name from content. It even has one inapplicable example with an input element.
Do let me know if this was not the issue you were raising!

@mraccess77
Copy link
Author

SC 2.5.3. does apply to input though - so it sounds like we need to clarify that and create a different rule for inputs -- is that correct? I'm just thinking that some folks may get confused and assume that 2.5.3 doesn't apply to inputs because of this while it seems like you have just limited the scope of this test to certain situations which I missed.

@Jym77
Copy link
Collaborator

Jym77 commented Nov 13, 2020

The Background section has a note with the list of applicable elements.
I guess we can expand that note a bit to indicate that other elements are also considered by 2.5.3 but not by that rule (and why the rule ignores them).

Another rule for input or other roles is obviously welcome… but might hit a wall when trying to define what sighted users perceive as the label of the input (since poor HTML means it's often not a label element programatically associated to it…)

@WilcoFiers
Copy link
Member

Input elements aren't named from content. They were left out of this rule because it is much more difficult to programatically tell which element outside the widget is supposed to be the label. Even if there is a literal label element, it might not be the element the user will see as the label of the field.

A separate rule for labels that aren't part of the control would indeed be necessary. The gap is intentional, because of the difficulty in doing this programatically.

@WilcoFiers
Copy link
Member

Suggestion: write a rule that checks that there is a text node on the page that is included in the accessible name of "named from author" elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants