Typeahead: accessibility issues
See original GitHub issueBug description:
Typeahead component has accessibility issues. Code written in the html file:
<input id="typeahead" type="text" class="form-control" [(ngModel)]="model" [ngbTypeahead]="search" />
Code evaluated in the html markup ( from browsers debug console):
<input _ngcontent-c4="" aria-multiline="false" autocapitalize="off" autocorrect="off" class="form-control ng-untouched ng-pristine ng-valid" id="typeahead" role="combobox" type="text" ng-reflect-ngb-typeahead="function (text$) {="off" aria-autocomplete="list" aria-expanded="false">
The HTML markup gives it role="combobox"
and a property of aria-multiline="false"
.
However, according to https://www.w3.org/TR/wai-aria-1.1/#combobox, combobox has no arrtibute of type ‘aria-multiline’ because of which it is failing the axe accessibility test saying that the aria attribute is not allowed.
Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/angular/dnbxerkrvpap?file=app%2Ftypeahead-basic.html
(check the markup generated by the browser)
Versions of Angular, ng-bootstrap and Bootstrap:
Angular CLI: 7.0.6:
ng-bootstrap: 3.3.1
Bootstrap:4.1.1
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Guidelines for the accessibility of an autocompletion component
Autocomplete components are increasingly common in user interfaces, yet they often remain inaccessible. We therefore decided to carry out an ...
Read more >Accessible Autocomplete
View the full library of accessibility solutions. This is an accessible autocomplete which works with keyboard, screen readers, switch devices, and touch ...
Read more >Issues for Accessible Autocomplete | Drupal.org
Title Status Priority Category
Allow for an empty seach Needs review Normal Feature request
"exports" in package.json should be relative path Closed (fixed) Normal Bug...
Read more >What we learned from getting our autocomplete tested for ...
This isn't specifically an accessibility issue but it is a potential usability one. Becs – mobility impaired. Becs uses Dragon NaturallySpeaking ...
Read more >Autocomplete attribute must be used correctly | Axe Rules
Start building more accessible experiences. Axe DevTools Pro helps dev teams find and fix up to 80% of accessibility issues while coding ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try removing the attribute :
Is this gonna be fixed? It doesn’t seem like a huge change