mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-01 12:03:11 +00:00
fix(work-orders): single Unscheduled disclosure control for a11y
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
2ed770bc79
commit
f4cfafd7a6
1 changed files with 5 additions and 18 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue