Skip to content

fix(web): make tool provider cards buttons - #40249

Draft
lyzno1 wants to merge 1 commit into
mainfrom
codex/a11y-tool-provider-card
Draft

fix(web): make tool provider cards buttons#40249
lyzno1 wants to merge 1 commit into
mainfrom
codex/a11y-tool-provider-card

Conversation

@lyzno1

@lyzno1 lyzno1 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • Render each tool provider card as a native button type="button".
  • Map the existing disabled presentation to the native disabled state.
  • Preserve the block-card geometry with explicit w-full text-start.
  • Cover public button semantics, keyboard activation, and disabled behavior in the owner test.
  • Prune the exact two obsolete jsx-a11y suppressions.

Behavior contract

  • A tool card is reachable by Tab and opens its read-only details with pointer or Enter activation.
  • A disabled card is exposed as disabled, is skipped by browser activation, and does not open details.
  • Closing the detail view keeps the existing behavior.

Visual regression review

A temporary Storybook comparison rendered the previous div and the new button under the same production CSS. It was removed before commit.

  • Card geometry: 320 x 63 px for both
  • Padding: 12 x 16 px for both
  • Border: 0.5 px with 12 px radius for both
  • Title and description geometry: identical relative coordinates and dimensions
  • Text alignment: start for both
  • Hover background: rgb(249, 250, 251) for both
  • Disabled state: opacity 0.5 and cursor: not-allowed for both

The only intended new visual state is the browser focus indicator during keyboard navigation.

Validation

  • pnpm exec vp check app/components/tools/provider/tool-item.tsx app/components/tools/provider/__tests__/tool-item.spec.tsx
  • node scripts/lint-a11y.mjs app/components/tools/provider/tool-item.tsx
  • pnpm exec vp test run app/components/tools/provider/__tests__/tool-item.spec.tsx (3/3)
  • pnpm check (0 errors; 2059 existing warnings)

From Codex

@github-actions github-actions Bot added the web This relates to changes on the web. label Aug 9, 2026
@codecov

codecov Bot commented Aug 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.42%. Comparing base (e036075) to head (6fa8b4d).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #40249   +/-   ##
=======================================
  Coverage   86.41%   86.42%           
=======================================
  Files        5107     5107           
  Lines      290731   290749   +18     
  Branches    57917    57923    +6     
=======================================
+ Hits       251245   251267   +22     
+ Misses      34545    34541    -4     
  Partials     4941     4941           
Flag Coverage Δ
dify-ui 93.49% <ø> (ø)
web 86.11% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant