-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
[alt-text] input element with all types should have check #1718
Comments
I can see how the In https://dequeuniversity.com/rules/axe/4.8/label the rule description says
Which closely relates to rule label-has-associated-control However, this does not check if an input has I believe this was done intentionally not to encourage the use of ARIA as "No ARIA is better than Bad ARIA"1 I hope this helps clear the confusion 😄 Footnotes |
@estevezluis I don't understand your explanation ? In the rule source code, it is clearly stated in the description, that it involves alternative text with aria-label etc. ? We want to have a warning/error when we have a button that says "upload file", but there is no visible label above. This is common use case. This rule should target that, or another rule should be created that does that, if this rule is only meant for images, but then the description of this rule is wrong. 🙏
|
Description and reproduction of the issue
In the rule source code, for input elements, there is a check, that the rule will only apply if the input element has the type
image
. But all other types, such asfile
andtext
should also havearial-label
attribute according to googles web accessability reference from Lighthouse report: https://dequeuniversity.com/rules/axe/4.8/labelRule source code (https://github.com/angular-eslint/angular-eslint/blob/main/packages/eslint-plugin-template/src/rules/alt-text.ts):
Setting the rule
These will not produce any warning/error - but they should, because they should have arial-label attribute
Versions
Since the link provided to the rule is from the latest main branch, it's not tied to anything local, but here is the versions anyway:
The text was updated successfully, but these errors were encountered: