Complete common picker and tree field accessibility

This commit is contained in:
Joseph Doherty
2026-11-13 21:52:00 -05:00
parent 25e78ebe92
commit b990ebe3ea
43 changed files with 2581 additions and 74 deletions
@@ -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>