forked from molecule-ai/molecule-core
Merge pull request #2693 from Molecule-AI/a11y/canvas-tabs-button-sweep
canvas/{Details,Config,Activity}Tab: button hover sweep (6 buttons across 3 tabs)
This commit is contained in:
commit
e307334ca4
@ -110,8 +110,11 @@ export function ActivityTab({ workspaceId }: Props) {
|
|||||||
Full Trace
|
Full Trace
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
|
type="button"
|
||||||
onClick={loadActivities}
|
onClick={loadActivities}
|
||||||
className="px-2 py-1 bg-surface-card hover:bg-surface-card text-[11px] rounded text-ink-mid"
|
// hover:bg-surface-card on top of itself was a no-op;
|
||||||
|
// lift to surface-elevated + focus-visible ring.
|
||||||
|
className="px-2 py-1 bg-surface-card hover:bg-surface-elevated hover:text-ink text-[11px] rounded text-ink-mid transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/50"
|
||||||
>
|
>
|
||||||
Refresh
|
Refresh
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -65,11 +65,11 @@ function AgentCardSection({ workspaceId }: { workspaceId: string }) {
|
|||||||
{error && <div className="px-2 py-1 bg-red-900/30 border border-red-800 rounded text-[10px] text-bad">{error}</div>}
|
{error && <div className="px-2 py-1 bg-red-900/30 border border-red-800 rounded text-[10px] text-bad">{error}</div>}
|
||||||
<div className="flex gap-2">
|
<div className="flex gap-2">
|
||||||
<button type="button" onClick={handleSave} disabled={saving}
|
<button type="button" onClick={handleSave} disabled={saving}
|
||||||
className="px-2 py-1 bg-accent-strong hover:bg-accent text-[10px] rounded text-white disabled:opacity-50">
|
className="px-2 py-1 bg-accent hover:bg-accent-strong text-[10px] rounded text-white disabled:opacity-50 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60 focus-visible:ring-offset-1 focus-visible:ring-offset-surface">
|
||||||
{saving ? "Saving..." : "Save"}
|
{saving ? "Saving..." : "Save"}
|
||||||
</button>
|
</button>
|
||||||
<button type="button" onClick={() => setEditing(false)}
|
<button type="button" onClick={() => setEditing(false)}
|
||||||
className="px-2 py-1 bg-surface-card hover:bg-surface-card text-[10px] rounded text-ink-mid">Cancel</button>
|
className="px-2 py-1 bg-surface-card hover:bg-surface-elevated hover:text-ink text-[10px] rounded text-ink-mid transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-1 focus-visible:ring-offset-surface">Cancel</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
@ -956,7 +956,8 @@ export function ConfigTab({ workspaceId }: Props) {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={() => handleSave(true)}
|
onClick={() => handleSave(true)}
|
||||||
disabled={!isDirty || saving}
|
disabled={!isDirty || saving}
|
||||||
className="px-3 py-1.5 bg-accent-strong hover:bg-accent text-xs rounded text-white disabled:opacity-30 transition-colors"
|
// Same accent-LIGHTER fix shipped on every other tab.
|
||||||
|
className="px-3 py-1.5 bg-accent hover:bg-accent-strong text-xs rounded text-white disabled:opacity-30 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60 focus-visible:ring-offset-1 focus-visible:ring-offset-surface"
|
||||||
>
|
>
|
||||||
{saving ? "Restarting..." : "Save & Restart"}
|
{saving ? "Restarting..." : "Save & Restart"}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
@ -166,7 +166,10 @@ export function DetailsTab({ workspaceId, data }: Props) {
|
|||||||
type="button"
|
type="button"
|
||||||
onClick={handleSave}
|
onClick={handleSave}
|
||||||
disabled={saving}
|
disabled={saving}
|
||||||
className="px-3 py-1 bg-accent-strong hover:bg-accent text-xs rounded text-white disabled:opacity-50"
|
// Was bg-accent-strong hover:bg-accent — accent is the
|
||||||
|
// LIGHTER variant; flipped + focus-visible ring (same
|
||||||
|
// trap fix shipped on every other tab).
|
||||||
|
className="px-3 py-1 bg-accent hover:bg-accent-strong text-xs rounded text-white disabled:opacity-50 transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/60 focus-visible:ring-offset-1 focus-visible:ring-offset-surface"
|
||||||
>
|
>
|
||||||
{saving ? "Saving..." : "Save"}
|
{saving ? "Saving..." : "Save"}
|
||||||
</button>
|
</button>
|
||||||
@ -322,7 +325,10 @@ export function DetailsTab({ workspaceId, data }: Props) {
|
|||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={handleDelete}
|
onClick={handleDelete}
|
||||||
className="px-3 py-1 bg-red-600 hover:bg-red-500 text-xs rounded text-white"
|
// hover:bg-red-500 LIGHTER on white text drops AA;
|
||||||
|
// flipped to bg-red-700 + focus-visible danger ring,
|
||||||
|
// matching the ConfirmDialog/DeleteCascade pattern.
|
||||||
|
className="px-3 py-1 bg-red-600 hover:bg-red-700 text-xs rounded text-white transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-red-500/60 focus-visible:ring-offset-1 focus-visible:ring-offset-surface"
|
||||||
>
|
>
|
||||||
Confirm Delete
|
Confirm Delete
|
||||||
</button>
|
</button>
|
||||||
@ -334,7 +340,9 @@ export function DetailsTab({ workspaceId, data }: Props) {
|
|||||||
// Return focus to the trigger so keyboard users aren't stranded
|
// Return focus to the trigger so keyboard users aren't stranded
|
||||||
deleteButtonRef.current?.focus();
|
deleteButtonRef.current?.focus();
|
||||||
}}
|
}}
|
||||||
className="px-3 py-1 bg-surface-card hover:bg-surface-card text-xs rounded text-ink-mid"
|
// Was hover:bg-surface-card on top of itself (no-op);
|
||||||
|
// lift to surface-elevated.
|
||||||
|
className="px-3 py-1 bg-surface-card hover:bg-surface-elevated hover:text-ink text-xs rounded text-ink-mid transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-accent/40 focus-visible:ring-offset-1 focus-visible:ring-offset-surface"
|
||||||
>
|
>
|
||||||
Cancel
|
Cancel
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user