fix(work-orders): single Unscheduled disclosure control for a11y

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
arthur.bassi 2026-08-10 19:07:11 -03:00
parent 2ed770bc79
commit f4cfafd7a6

View file

@ -42,9 +42,9 @@ export function WoTableSectionHeader({
<div className="flex items-center gap-2.5">
<button
type="button"
className="flex items-center gap-2.5"
className="flex flex-1 items-center gap-2.5"
aria-expanded={!collapsed}
aria-label={label}
aria-label={`${label}, ${count} work order${count !== 1 ? "s" : ""}${collapsed ? ", collapsed" : ", expanded"}`}
onClick={toggleCollapse}
style={{
background: "transparent",
@ -70,6 +70,9 @@ export function WoTableSectionHeader({
<span style={{ fontSize: 12, color: "var(--color-text-muted)" }}>
{count} work order{count !== 1 ? "s" : ""}
</span>
<span className="ml-auto flex items-center" style={{ color: "var(--warning)" }}>
{collapsed ? <ChevronRight size={14} /> : <ChevronDown size={14} />}
</span>
</button>
<button
type="button"
@ -80,22 +83,6 @@ export function WoTableSectionHeader({
<Plus size={13} />
Add WO
</button>
<button
type="button"
className="ml-auto flex items-center"
aria-expanded={!collapsed}
aria-label={collapsed ? `Expand ${label}` : `Collapse ${label}`}
onClick={toggleCollapse}
style={{
background: "transparent",
border: "none",
padding: 0,
cursor: "pointer",
color: "var(--warning)",
}}
>
{collapsed ? <ChevronRight size={14} /> : <ChevronDown size={14} />}
</button>
</div>
</td>
</tr>