File tree Expand file tree Collapse file tree
src/CodeBeam.MudBlazor.Extensions/Components/ListExtended
tests/CodeBeam.MudBlazor.Extensions.UnitTests/Components Expand file tree Collapse file tree Original file line number Diff line number Diff line change 8282 < div class = " @MultiSelectClassName" >
8383 @if (OverrideMultiSelectionComponent == null ? MudListExtended ? .MultiSelectionComponent == MultiSelectionComponent .CheckBox : OverrideMultiSelectionComponent .Value == MultiSelectionComponent .CheckBox )
8484 {
85- < 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 }" )" / >
8687 }
8788 else if (OverrideMultiSelectionComponent == null ? MudListExtended ? .MultiSelectionComponent == MultiSelectionComponent .Switch : OverrideMultiSelectionComponent .Value == MultiSelectionComponent .Switch )
8889 {
89- < 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 }" )" / >
9092 }
9193 else if (OverrideMultiSelectionComponent == null ? MudListExtended ? .MultiSelectionComponent == MultiSelectionComponent .SwitchM3 : OverrideMultiSelectionComponent .Value == MultiSelectionComponent .SwitchM3 )
9294 {
93- < 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 }" )" / >
9497 }
9598 < / div >
9699 }
Original file line number Diff line number Diff line change @@ -57,11 +57,11 @@ public void MultiSelect_Items_Should_Expose_Checkbox_AriaLabel_And_TestId()
5757 item . GetAttribute ( "role" ) . Should ( ) . Be ( "option" ) ;
5858 var checkbox = item . QuerySelector ( "input[type=checkbox]" ) ;
5959 checkbox . Should ( ) . NotBeNull ( ) ;
60- var ariaLabel = checkbox . GetAttribute ( "aria-label" ) ;
61- ariaLabel . Should ( ) . NotBeNullOrEmpty ( ) ;
6260 var optionAria = item . GetAttribute ( "aria-label" ) ;
6361 optionAria . Should ( ) . NotBeNullOrEmpty ( ) ;
64- optionAria . Trim ( ) . Should ( ) . Be ( ariaLabel . Trim ( ) ) ;
62+ var checkboxAria = checkbox . GetAttribute ( "aria-label" ) ;
63+ checkboxAria . Should ( ) . NotBeNullOrEmpty ( ) ;
64+ checkboxAria . Trim ( ) . Should ( ) . Be ( $ "Select { optionAria . Trim ( ) } ") ;
6565 }
6666
6767 // Note: MudSelect doesn't guaranteed the consequences of changing Value if MultiSelection is true for now.
You can’t perform that action at this time.
0 commit comments