Skip to content

fix(ui): row color adjustment for component tables - #58

Open
a-effort wants to merge 1 commit into
mainfrom
ui/restore-flat-table-row-fill
Open

fix(ui): row color adjustment for component tables#58
a-effort wants to merge 1 commit into
mainfrom
ui/restore-flat-table-row-fill

Conversation

@a-effort

@a-effort a-effort commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What

Reverts the hover/selected fill steps that 8a07588 added to the three drawer tables during #47, restoring the flat fill from that PR's first commit:

  • ToolsTable.tsx, ResourcesTable.tsx, PromptDefinitionTable.tsx — base, hover and selected all bg-neutral-50 / dark:bg-neutral-800/50.
  • data-state="selected" stays on the row for tests and any future affordance.
  • Drops the PromptDefinitionTable docblock line that framed the flat fill as an accessibility gap.

Why

8a07588 landed as a contrast fix. Measured, the steps fail two SCs.

1.4.11 non-text contrast — a state indicator needs 3:1 against what it's distinguished from. Neither step is close, so neither reads as a state:

pair light dark
hover vs base 1.04:1 1.25:1
selected vs base 1.21:1 1.59:1
selected vs hover 1.16:1

1.4.3 text contrast — the URI and ID columns are text-xs text-muted-foreground, so they need 4.5:1. The selected fill is dark enough to push them under:

fill muted-fg contrast
light base neutral-50 4.54:1 ✅
light selected neutral-200 3.76:1 ❌
dark base neutral-800/50 6.38:1 ✅
dark selected neutral-700 4.01:1 ❌

So the selected fill traded a cue below the perceptibility threshold for body text below AA — a net accessibility regression in both themes. On the flat fill, which row is open is carried by the details rail, and keyboard position by the focus ring.

Ratios are WCAG 2.x, computed from the resolved tokens in src/index.css (--popover, --foreground, --muted-foreground) with the /50 and /60 alphas composited over the drawer body.

Follow-up, not in this PR

Rows keep their click and keyboard handlers here. Making them inert and moving the affordances onto the row's own controls is #59.

--ring against the row fill is 2.48:1 in light, 3.48:1 in dark. Light is below the 3:1 that 1.4.11 and 2.4.11 want of a focus indicator, and since the flat fill leans on the ring for keyboard state, it's worth fixing — but --ring is global, so it's its own change.

Selection is still not exposed to assistive tech (no grid role, no aria-selected) on any of the three tables. Also pre-existing, also cross-cutting.

Testing

84 tests across the three table suites pass; tsc, eslint, prettier clean. No e2e run.

@a-effort a-effort changed the title fix(ui): restore the flat row fill on tools, resources & prompts tables fix(ui): row color adjustment for tables Aug 20, 2026
Reverts the light/dark hover and selected steps added in 8a07588 during
PR #47. The steps sat below the contrast threshold, so they read as a
selection cue without being one — the details drawer remains the
affordance for which row is open. Drops the comment that framed the flat
fill as an accessibility gap.

Signed-off-by: Anna Effort <anna.effort@ibm.com>
@a-effort
a-effort force-pushed the ui/restore-flat-table-row-fill branch from c085ab6 to 09b0741 Compare August 20, 2026 18:45
@a-effort a-effort changed the title fix(ui): row color adjustment for tables fix(ui): row color adjustment for component tables Aug 20, 2026

@marekdano marekdano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! LGTM 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants