Comments (2)
I can see how the alt-text
rule name can be interpreted as "alternative text", indicating aria-label, but I believe alt-text is related to image-alt
In https://dequeuniversity.com/rules/axe/4.8/label the rule description says
Each form element must have a programmatically associated label element.
Which closely relates to rule label-has-associated-control However, this does not check if an input has aria-label
attribute.
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
from angular-eslint.
@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. 🙏
export default createESLintRule<Options, MessageIds>({
name: RULE_NAME,
meta: {
type: 'suggestion',
docs: {
description:
'[Accessibility] Enforces alternate text for elements which require the alt, aria-label, aria-labelledby attributes.',
},
schema: [],
messages: {
altText: '<{{element}}/> element must have a text alternative.',
},
},
from angular-eslint.
Related Issues (20)
- [label-has-associated-control] ids in the for attribute are not checked for existence HOT 1
- @angular-eslint/builder references [email protected] which has CVE-2023-29827 HOT 2
- [@angular-eslint/schematics] skip-install ignored
- Unexpected 9MB binary produced from `@angular-eslint/schematics`: `.nx/cache/18.3.3-nx.linux-x64-gnu.node` HOT 25
- [prefer-output-readonly] stops working HOT 1
- [@angular-eslint/template/attributes-order] Autofix produces invalid HTML with structural directives (*foo) HOT 1
- [@angular-eslint/template/i18n] Prevent spaces at beginning/end of translated strings HOT 1
- Vulnerabilty with ejs which is dependant on @angular-eslint/builder ( ejs lacks certain pollution protection ) HOT 2
- [@angular-eslint/eslint-plugin] Support es lint 9.0 HOT 1
- Type resolution error for jasmine test function `it` if build output folder is not empty
- [prefer-signals] add rule for prefer signals instead of BehaviorSubject HOT 3
- Angular eslint template rules don't apply to inline templates inside blocks
- Can't update to Angular 18 HOT 5
- [@angular-eslint/template/i18n] New lint rule suggestion: i18n rule should also lint $localize usage in components
- eslint v9 support HOT 1
- @angular-eslint v18 requires typescript-eslint v8 but not v7 HOT 9
- [prefer-self-closing-tags] <app-root /> conflicts with angular-cli build HOT 2
- [@angular-eslint/schematics] Also provide ESModule syntax (in addition to commonJS) HOT 2
- [@angular-eslint/no-input-rename] Reports false error when using transform with function which accept 2 parameters
- ng lint fails for new workspace created with Angular CLI and flat-config HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-eslint.