Skip to content

Commit

Permalink
fix(material/list): fix duplicate focus with chromevox on action items
Browse files Browse the repository at this point in the history
For the list component, fix chromevox screenreader bug where it
duplicated focus on each item in the action list. After focusing on a
`button` in the action list, linearly navigating forward moved focus to
the `.mat-list-item-content` of the same item.

Fixes this by change the list item content from a `div` to `span`, since
we're generally not supposed to use div's inside buttons.
  • Loading branch information
zarend committed Aug 12, 2021
1 parent 57d8e78 commit 98fe75b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/material/list/list-item.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="mat-list-item-content">
<span class="mat-list-item-content">
<div class="mat-list-item-ripple" mat-ripple
[matRippleTrigger]="_getHostElement()"
[matRippleDisabled]="_isRippleDisabled()">
Expand All @@ -10,4 +10,4 @@
<div class="mat-list-text"><ng-content select="[mat-line], [matLine]"></ng-content></div>

<ng-content></ng-content>
</div>
</span>

0 comments on commit 98fe75b

Please sign in to comment.