Sha*_*eer 1 html accessibility lighthouse wai-aria angular
我已经在 google chrome light house 中为我的角度应用程序运行了可访问性测试,并收到以下错误
我添加了“aria-labelledby”,但似乎不起作用。谁能帮我解决这个问题。下面是给我这个错误的html代码。
<div class="heading form-group col-md-4 col-xs-12">
<label for="fuels">Fuel Filter</label>
<ng-select class="oss-ngselect" [items]="fuelType" bindLabel="name"
placeholder="View All" [(ngModel)]="searchPremiseFuelType" [dropdownPosition]="'bottom'"
id="fuels" name="fuels" (change)="changeFuelType(searchPremiseFuelType.type)"
aria-labelledby="fuels">
</ng-select>
</div>
Run Code Online (Sandbox Code Playgroud)
aria-labelledby用于标识另一个元素,使用其 ID 作为当前元素的名称。
请尝试给予aria-label="fuels" instead of aria-labelledby
欲了解更多信息,我建议浏览以下博客:: https://web.dev/aria-name/
| 归档时间: |
|
| 查看次数: |
5980 次 |
| 最近记录: |