Skip to content

fix(web): use buttons for pricing categories - #40360

Merged
lyzno1 merged 2 commits into
mainfrom
codex/a11y-pricing-category-buttons
Aug 10, 2026
Merged

fix(web): use buttons for pricing categories#40360
lyzno1 merged 2 commits into
mainfrom
codex/a11y-pricing-category-buttons

Conversation

@lyzno1

@lyzno1 lyzno1 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • replace the cloud/self-hosted pricing category containers with native buttons
  • expose the active category through aria-pressed
  • verify both accessible category names, initial state, Space-key activation, and the full pricing-list transition
  • migrate the remaining category-switching tests from text nodes to semantic buttons
  • remove the two exact jsx-a11y suppressions

Boundary

  • limited to the pricing category Tab owner, its existing integration test, and the suppression baseline
  • plan pricing, yearly billing, payment flows, category state, and custom SVG assets are unchanged
  • no CSS-icon or React component cleanup is mixed into this PR

Validation

  • regression proof: 5 of 20 integration tests fail against the old non-semantic category controls
  • pnpm --dir web exec vp test run __tests__/billing/pricing-modal-flow.test.tsx — 20/20 passed
  • ./node_modules/.bin/vp lint web/app/components/billing/pricing/plan-switcher/tab.tsx web/__tests__/billing/pricing-modal-flow.test.tsx
  • pnpm --dir web lint:a11y app/components/billing/pricing/plan-switcher/tab.tsx
  • pnpm check — 0 errors, 2059 existing warnings
  • git diff --check

Visual regression review

  • verify cloud and self-hosted controls retain their horizontal padding, vertical padding, gap, SVG alignment, typography, and active/inactive colors
  • appearance-none prevents platform button chrome; the explicit flex centering matches the previous containers
  • verify the pricing header height and divider alignment do not move
  • the only intended new visual state is the keyboard-only focus-visible ring

Stack

Independent root PR based directly on current origin/main; no child cleanup is required.

Rollback

Revert commit 19415761dc; no other accessibility PR depends on this branch.

@lyzno1 lyzno1 changed the title codex/a11y pricing category buttons fix(web): use buttons for pricing categories Aug 9, 2026
@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.43%. Comparing base (7522ae1) to head (e4fa311).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #40360      +/-   ##
==========================================
- Coverage   86.47%   86.43%   -0.05%     
==========================================
  Files        5264     5107     -157     
  Lines      294867   290740    -4127     
  Branches    59029    57924    -1105     
==========================================
- Hits       254976   251288    -3688     
+ Misses      34950    34511     -439     
  Partials     4941     4941              
Flag Coverage Δ
cli ?
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.

@lyzno1
lyzno1 marked this pull request as ready for review August 9, 2026 15:47
@lyzno1
lyzno1 requested review from iamjoel and zxhlyh as code owners August 9, 2026 15:47
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. refactor labels Aug 9, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Aug 10, 2026
@lyzno1
lyzno1 added this pull request to the merge queue Aug 10, 2026
Merged via the queue into main with commit 8b908d6 Aug 10, 2026
42 checks passed
@lyzno1
lyzno1 deleted the codex/a11y-pricing-category-buttons branch August 10, 2026 03:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:XS This PR changes 0-9 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants