[feature request]: Allow aria-label to suppress template-accessibility-elements-content violation
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- angular, typescript
- 领域
- accessibility, tooling
调研方向
首先定位 template-accessibility-elements-content 规则的实现和测试,然后复现报告中的带有 aria-label 的 button 示例。确定 aria-label 应默认被接受,还是应通过规则选项接受,并更新相关行为和测试,使该示例不再报告 violation。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
I'm facing an issue when I don't want to set explicit text content for a button element but I want to use aria-label for assistive technologies instead. In my current situation, I have a directive that adds icons to the button but without text.
Would it be possible for template-accessibility-elements-content to consider aria-label to be an acceptable alternative (either by default or as a rule option)?
Context and configuration
Please share:
- Which rule is causing the problem
template-accessibility-elements-content - What's the content of your
tsconfig.json
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"baseUrl": "src",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"importHelpers": true,
"downlevelIteration": true,
"experimentalDecorators": true,
"target": "ES2015",
"module": "ESNext",
"typeRoots": ["node_modules/@types"],
"lib": ["ES2018", "DOM"]
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true,
"enableIvy": true
}
}
- What's the content of
~/.codelyzer.js(if applicable)
I do not have it.
Expected behavior
<button class="btn-close" aria-label="close></button> should NOT produce an error.
Additional context
I believe a similar question about "aria-label" support might be raised to all others template-accessibility-* rules.
- 主要语言
- TypeScript
- 星标
- 2.5k
- 派生
- 232
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mgechev/codelyzer 的其他 Issue
-
难度 3/5 1-2 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 32/100
-
Angular 14未关闭
难度 2/5 1-3 小时 新手友好度 35/100
-
Support for Angular 10可能已有人在做 @ccarmesin 于 1842 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 25/100
查看 mgechev/codelyzer 的全部 Issue
相似的 Issue
-
agent-ready area: ui-server priority: p3 type: test
难度 2/5 1-3 小时 新手友好度 78/100
schlessera/brain-kit#4249 ·
维护者通常 1 天内回复
-
documentation tool triaged
难度 2/5 1-3 小时 新手友好度 73/100
can1357/oh-my-pi#19608 · 2 条评论 ·
维护者通常 1 天内回复
-
dependencies tech-debt
难度 2/5 1-3 小时 新手友好度 65/100
bcgov/nr-waste-plus#1549 ·
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 78/100
blixvip/solana-token-meta#17 ·
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 78/100
blixvip/solana-tx-parse#18 ·