Skip to content

Commit

Permalink
demos accessibility improved
Browse files Browse the repository at this point in the history
  • Loading branch information
enchev committed Dec 6, 2023
1 parent bb8f13d commit efae6af
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion RadzenBlazorDemos/Pages/DataGridCustomHeader.razor
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<RadzenDataGridColumn Visible="@EmployeeIDVisible" TItem="Employee" Property="EmployeeID" Title="ID" Width="80px" TextAlign="TextAlign.Center" Frozen="true" />
<RadzenDataGridColumn TItem="Employee" Title="Photo" Sortable="false" Width="200px" Pickable="false">
<Template Context="data">
<RadzenImage Path="@data.Photo" class="rz-gravatar" />
<RadzenImage Path="@data.Photo" class="rz-gravatar" AlternateText="@(data.FirstName + " " + data.LastName)" />
</Template>
</RadzenDataGridColumn>
<RadzenDataGridColumn TItem="Employee" Property="FirstName" Title="First Name" />
Expand Down
2 changes: 1 addition & 1 deletion RadzenBlazorDemos/Pages/DataGridFrozenColumns.razor
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<RadzenDataGridColumn TItem="Employee" Property="EmployeeID" Filterable="false" Title="ID" Frozen="true" Width="5rem" TextAlign="TextAlign.Center" />
<RadzenDataGridColumn TItem="Employee" Title="Photo" Sortable="false" Filterable="false" Frozen="@frozen" Width="80px" TextAlign="TextAlign.Center">
<HeaderTemplate>
<RadzenCheckBox @bind-Value="frozen" title="Pin/Unpin this column" />
<RadzenCheckBox @bind-Value="frozen" title="Pin/Unpin this column" InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "Pin/Unpin Photo column" }})" />
</HeaderTemplate>
<Template Context="data">
<RadzenImage Path="@data.Photo" class="rz-gravatar" AlternateText="@(data.FirstName + " " + data.LastName)" />
Expand Down
4 changes: 2 additions & 2 deletions RadzenBlazorDemos/Pages/DataGridMultipleSelection.razor
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
<Columns>
<RadzenDataGridColumn TItem="Employee" Width="60px" Sortable="false" Filterable="false">
<HeaderTemplate>
<RadzenCheckBox TriState="false" TValue="bool?"
<RadzenCheckBox TriState="false" TValue="bool?" InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "Select all items" }})"
Value="@(selectedEmployees == null || selectedEmployees?.Any() != true ? false : !employees.All(i => selectedEmployees.Contains(i)) ? null : employees.Any(i => selectedEmployees.Contains(i)))"
Change="@(args => selectedEmployees = args == true ? employees.ToList() : null)" />
</HeaderTemplate>
<Template Context="data">
<RadzenCheckBox TriState="false" Value="@(selectedEmployees != null && selectedEmployees.Contains(data))"
<RadzenCheckBox TriState="false" Value="@(selectedEmployees != null && selectedEmployees.Contains(data))" InputAttributes="@(new Dictionary<string,object>(){ { "aria-label", "Select item" }})"
TValue="bool" Change=@(args => { if(!allowRowSelectOnRowClick) { grid.SelectRow(data); }}) />
</Template>
</RadzenDataGridColumn>
Expand Down

0 comments on commit efae6af

Please sign in to comment.