mirror of
https://github.com/Sea-Haven-Industries/shoc-frontend-new.git
synced 2026-10-04 17:12:06 +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">
|
<div className="flex items-center gap-2.5">
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
className="flex items-center gap-2.5"
|
className="flex flex-1 items-center gap-2.5"
|
||||||
aria-expanded={!collapsed}
|
aria-expanded={!collapsed}
|
||||||
aria-label={label}
|
aria-label={`${label}, ${count} work order${count !== 1 ? "s" : ""}${collapsed ? ", collapsed" : ", expanded"}`}
|
||||||
onClick={toggleCollapse}
|
onClick={toggleCollapse}
|
||||||
style={{
|
style={{
|
||||||
background: "transparent",
|
background: "transparent",
|
||||||
|
|
@ -70,6 +70,9 @@ export function WoTableSectionHeader({
|
||||||
<span style={{ fontSize: 12, color: "var(--color-text-muted)" }}>
|
<span style={{ fontSize: 12, color: "var(--color-text-muted)" }}>
|
||||||
{count} work order{count !== 1 ? "s" : ""}
|
{count} work order{count !== 1 ? "s" : ""}
|
||||||
</span>
|
</span>
|
||||||
|
<span className="ml-auto flex items-center" style={{ color: "var(--warning)" }}>
|
||||||
|
{collapsed ? <ChevronRight size={14} /> : <ChevronDown size={14} />}
|
||||||
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
|
@ -80,22 +83,6 @@ export function WoTableSectionHeader({
|
||||||
<Plus size={13} />
|
<Plus size={13} />
|
||||||
Add WO
|
Add WO
|
||||||
</button>
|
</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>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue