Commit b8baf4d
committed
fix(material/list): fix selection-list staying in tab order when disabled
Remove list options from the tab order when the entire slection list is
disabled. Fix accessibility issue where end user can tab to a disabled selection
list.
```
<mat-selection-list disabled>
<mat-list-option>A</mat-list-option>
<!-- ^ should have tabindex="-1" since entire list is disabled -->
</mat-selection-list>
```
Approach is to consider a disabled mat-selection-list with a mat-list-option
having `tabindex="0"` an invalid state. When disabled Input on the seleciton
list is set to true, set tabindex to -1 on every list option.
fixes #257301 parent 72547a4 commit b8baf4d
File tree
4 files changed
+76
-4
lines changed- src/material/list
- tools/public_api_guard/material
4 files changed
+76
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
60 | 62 | | |
61 | 63 | | |
62 | 64 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
804 | 804 | | |
805 | 805 | | |
806 | 806 | | |
| 807 | + | |
| 808 | + | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
| 817 | + | |
| 818 | + | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
807 | 830 | | |
808 | 831 | | |
809 | 832 | | |
| |||
1373 | 1396 | | |
1374 | 1397 | | |
1375 | 1398 | | |
| 1399 | + | |
1376 | 1400 | | |
1377 | 1401 | | |
1378 | 1402 | | |
1379 | 1403 | | |
1380 | 1404 | | |
1381 | 1405 | | |
| 1406 | + | |
| 1407 | + | |
| 1408 | + | |
| 1409 | + | |
| 1410 | + | |
| 1411 | + | |
| 1412 | + | |
1382 | 1413 | | |
1383 | 1414 | | |
1384 | 1415 | | |
| |||
1389 | 1420 | | |
1390 | 1421 | | |
1391 | 1422 | | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1392 | 1430 | | |
1393 | 1431 | | |
1394 | 1432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
233 | 252 | | |
234 | 253 | | |
235 | 254 | | |
| |||
365 | 384 | | |
366 | 385 | | |
367 | 386 | | |
368 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
369 | 400 | | |
370 | 401 | | |
371 | 402 | | |
372 | 403 | | |
373 | 404 | | |
374 | | - | |
375 | 405 | | |
376 | 406 | | |
377 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| 219 | + | |
| 220 | + | |
219 | 221 | | |
220 | 222 | | |
221 | 223 | | |
| |||
243 | 245 | | |
244 | 246 | | |
245 | 247 | | |
246 | | - | |
| 248 | + | |
247 | 249 | | |
248 | 250 | | |
249 | 251 | | |
| |||
0 commit comments