|
5 | 5 |
|
6 | 6 | @if (IsVisible) |
7 | 7 | { |
8 | | - <div tabindex="0" @attributes="UserAttributes" id="@ItemId" class="@Classname" @onclick="@(((MudListExtended?.Clickable == true || NestedList != null) && IsFunctional == false) ? OnClickHandler : OnlyOnClick)" @onclick:stopPropagation="@OnClickStopPropagation" style="@Style"> |
| 8 | + <div tabindex="0" @attributes="UserAttributes" id="@ItemId" class="@Classname" |
| 9 | + role="option" |
| 10 | + aria-selected="@(_selected ? "true" : "false")" |
| 11 | + aria-label="@AccessibleName" |
| 12 | + @onclick="@(((MudListExtended?.Clickable == true || NestedList != null) && IsFunctional == false) ? OnClickHandler : OnlyOnClick)" @onclick:stopPropagation="@OnClickStopPropagation" style="@Style"> |
9 | 13 |
|
10 | 14 | @if (MudListExtended?.ItemDisabledTemplate != null && GetDisabledStatus() == true) |
11 | | - { |
| 15 | + { |
12 | 16 | @MudListExtended.ItemDisabledTemplate(this) |
13 | 17 | } |
14 | 18 | else if (MudListExtended?.ItemSelectedTemplate != null && IsSelected == true) |
|
27 | 31 | <div class="@MultiSelectClassName"> |
28 | 32 | @if (OverrideMultiSelectionComponent == null ? MudListExtended?.MultiSelectionComponent == MultiSelectionComponent.CheckBox : OverrideMultiSelectionComponent.Value == MultiSelectionComponent.CheckBox) |
29 | 33 | { |
30 | | - <MudCheckBox Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" Dense="true" /> |
| 34 | + <MudCheckBox Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" Dense="true" |
| 35 | + aria-label="@($"Select {AccessibleName}")" /> |
31 | 36 | } |
32 | 37 | else if (OverrideMultiSelectionComponent == null ? MudListExtended?.MultiSelectionComponent == MultiSelectionComponent.Switch : OverrideMultiSelectionComponent.Value == MultiSelectionComponent.Switch) |
33 | 38 | { |
34 | | - <MudSwitch Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" StopClickPropagation="true" /> |
| 39 | + <MudSwitch Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" StopClickPropagation="true" |
| 40 | + aria-label="@($"Select {AccessibleName}")" /> |
35 | 41 | } |
36 | 42 | else if (OverrideMultiSelectionComponent == null ? MudListExtended?.MultiSelectionComponent == MultiSelectionComponent.SwitchM3 : OverrideMultiSelectionComponent.Value == MultiSelectionComponent.SwitchM3) |
37 | 43 | { |
38 | | - <MudSwitchM3 Class="mr-4" Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" StopClickPropagation="true" /> |
| 44 | + <MudSwitchM3 Class="mr-4" Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" StopClickPropagation="true" |
| 45 | + aria-label="@($"Select {AccessibleName}")" /> |
39 | 46 | } |
40 | 47 | </div> |
41 | 48 | } |
|
75 | 82 | <div class="@MultiSelectClassName"> |
76 | 83 | @if (OverrideMultiSelectionComponent == null ? MudListExtended?.MultiSelectionComponent == MultiSelectionComponent.CheckBox : OverrideMultiSelectionComponent.Value == MultiSelectionComponent.CheckBox) |
77 | 84 | { |
78 | | - <MudCheckBox Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" Dense="true" /> |
| 85 | + <MudCheckBox Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" Dense="true" |
| 86 | + aria-label="@($"Select {AccessibleName}")" /> |
79 | 87 | } |
80 | 88 | else if (OverrideMultiSelectionComponent == null ? MudListExtended?.MultiSelectionComponent == MultiSelectionComponent.Switch : OverrideMultiSelectionComponent.Value == MultiSelectionComponent.Switch) |
81 | 89 | { |
82 | | - <MudSwitch Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" StopClickPropagation="true" /> |
| 90 | + <MudSwitch Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" StopClickPropagation="true" |
| 91 | + aria-label="@($"Select {AccessibleName}")" /> |
83 | 92 | } |
84 | 93 | else if (OverrideMultiSelectionComponent == null ? MudListExtended?.MultiSelectionComponent == MultiSelectionComponent.SwitchM3 : OverrideMultiSelectionComponent.Value == MultiSelectionComponent.SwitchM3) |
85 | 94 | { |
86 | | - <MudSwitchM3 Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" StopClickPropagation="true" /> |
| 95 | + <MudSwitchM3 Color="@(MudListExtended?.Color ?? Color.Default)" Disabled="@GetDisabledStatus()" @bind-Value="_selected" @onclick="OnClickHandler" StopClickPropagation="true" |
| 96 | + aria-label="@($"Select {AccessibleName}")" /> |
87 | 97 | } |
88 | 98 | </div> |
89 | 99 | } |
|
0 commit comments