Complete common picker and tree field accessibility
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
<div @key="node.Key" class="d-flex align-items-center gap-1 py-1" style="@indent">
|
||||
@if (hasExpander)
|
||||
{
|
||||
<button type="button" class="btn btn-sm btn-link p-0 tree-twist"
|
||||
<button type="button" class="btn btn-sm btn-link p-0 tree-twist" aria-label="@((node.Expanded ? "Collapse " : "Expand ") + node.DisplayName)" aria-expanded="@(node.Expanded ? "true" : "false")"
|
||||
@onclick="@(() => ToggleAsync(node))">
|
||||
@(node.Expanded ? "▼" : "▶")
|
||||
</button>
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
@if (node.Selectable)
|
||||
{
|
||||
<button type="button"
|
||||
<button type="button" aria-pressed="@(selected ? "true" : "false")"
|
||||
class="btn btn-sm p-0 px-1 border-0 d-inline-flex align-items-center gap-1 @(selected ? "bg-primary text-white rounded" : "btn-link text-decoration-none")"
|
||||
@onclick="@(() => OnSelect.InvokeAsync(node))">
|
||||
<span aria-hidden="true">@node.Icon</span>
|
||||
|
||||
Reference in New Issue
Block a user