Skip to content

fix(web): name the chat settings trigger - #40199

Closed
lyzno1 wants to merge 1 commit into
mainfrom
codex/a11y-chat-dropdown-name
Closed

fix(web): name the chat settings trigger#40199
lyzno1 wants to merge 1 commit into
mainfrom
codex/a11y-chat-dropdown-name

Conversation

@lyzno1

@lyzno1 lyzno1 commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

Give the embedded chat settings icon button an accessible name and migrate its test away from data-testid.

This is the bottom PR in the Chat accessibility stack and targets main.

Behavioral contract

  • The icon-only trigger is named by the existing localized View chat settings action.
  • The icon is decorative and does not contribute to the accessible name.
  • The trigger remains a native ActionButton and exposes its open state through aria-expanded.
  • The owner test locates the control by role and name and verifies closed, open, and closed-again states.

Scope

  • One production component and its existing owner test.
  • One trigger data-testid removed after the semantic locator became available.
  • One commit: b250d73cbd.

HTML validity

The icon wrapper changes from div to span, keeping the button content within the phrasing-content model. The icon utility supplies the same inline-block geometry and all size/color classes are unchanged.

Non-goals

  • No global data-testid policy or deletion.
  • The unused content test hook remains for a dedicated test-hygiene audit.
  • No Popover primitive, layout, form, or CSS icon refactor.

Suppression status

No suppression is changed because this missing-name case is not currently covered by the repository jsx-a11y baseline rules. The targeted standalone a11y lint is clean, while the semantic test supplies the missing regression gate.

Verification

  • Red before implementation: the test found an unnamed button and could not query View chat settings by role/name.
  • pnpm --dir web exec vitest run app/components/base/chat/embedded-chatbot/inputs-form/__tests__/view-form-dropdown.spec.tsx
    • 1 file, 1 test passed.
  • pnpm --dir web lint:a11y app/components/base/chat/embedded-chatbot/inputs-form/view-form-dropdown.tsx
    • 0 diagnostics.
  • vp check --fix <two changed files>
    • 0 errors and 0 warnings.
  • git diff --check
    • passed.

Visual regression review

  • ActionButton, size, state, icon utility, dimensions, shrink behavior, and optional color class are unchanged.
  • aria-label and aria-hidden do not affect layout or paint.
  • The icon wrapper keeps the same generated icon display and exact class list.
  • No focus, hover, active, spacing, typography, or responsive class changed.

Reviewer check: this PR should have no visual CSS delta.

Rollback

Revert b250d73cbd; the production semantics and semantic locator roll back together.

From Codex

Give the embedded chat settings icon button its existing localized action name, keep its icon decorative with valid button content, and replace the test id locator with role, name, and expanded-state assertions.
@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.41%. Comparing base (e036075) to head (b250d73).

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #40199      +/-   ##
==========================================
- Coverage   86.41%   86.41%   -0.01%     
==========================================
  Files        5107     5107              
  Lines      290731   290732       +1     
  Branches    57917    57917              
==========================================
- Hits       251245   251243       -2     
- Misses      34545    34548       +3     
  Partials     4941     4941              
Flag Coverage Δ
dify-ui 93.49% <ø> (ø)
web 86.10% <100.00%> (-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 commented Aug 9, 2026

Copy link
Copy Markdown
Member Author

Superseded by #40341, which owns the same ViewFormDropdown trigger contract, adds the accessible name and semantic tests in one reviewable layer, and now also preserves valid inline content. The former dependent layers have been rebased away, so this branch is no longer a prerequisite.

@lyzno1 lyzno1 closed this Aug 9, 2026
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