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)
- [no-input-rename] support signal input/model
- [attributes-order] Fixer mangles code when valueless structural directives are present in final position. HOT 4
- [@typescript-eslint/array-type] Definition for rule '@typescript-eslint/array-type' was not found HOT 3
- Error: The `convert-tslint-to-eslint` schematic is no longer supported. HOT 3
- [attributes-order] angular input binding without brackets considered as attribute binding HOT 1
- [no-attributes-combination] new rule request
- [@angular-eslint/template/attributes-order] doc is missing the info what is default for `alphabetical` HOT 1
- Error in Angular-ESLint Integration: Unique Name Issue in Monorepo Project HOT 4
- [no-signal-compare?] new rule request to prevent comparing signals via < or > HOT 2
- Is there a linting role for detecting duplicated imports? HOT 4
- eslint v9.0.0 compatibility HOT 6
- [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
- 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
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.