0

For mat-chip-list as per the document the aria-role for chiplist as listbox with each chip has option as role,even I gave those two role as mentioned in the below code,

<mat-chip-list #chipList role="listbox" aria-label="filtervalues">
    <span *ngFor="let x of values">
      <span *ngFor="let y of x.items">
        <mat-chip role="option">y</mat-chip>
      </span>
    </span>
</mat-chip-list>

unable to attain 100% accessibility,shows "aria attributes does not match their roles".How to overcome this error?

Hestia
  • 11
  • 1
  • Which tool are you using? Automatic accessibility testing has its limits. Even with 100% you will still have accessibility issues, and not every error such tool produces is really an error. There always is some interpretation and manual audit necessary. Still, I would guess that your `` elements are interferring. Why are you wrapping each option in a span instead of using the ngFor directoy on the option? `` lets you loop stuff without creating additional elements. – Andy Oct 11 '22 at 19:10

0 Answers0