Skip to content

feat: enhance accessibility by adding htmlFor attributes to labels in… - #716

Merged
pikann merged 1 commit into
masterfrom
fix/fix-failed-automation-node-e2e-testing
Nov 9, 2026
Merged

pikann merged 1 commit into
masterfrom
fix/fix-failed-automation-node-e2e-testing

Conversation

@pikann

@pikann pikann commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixes the e2e failures in automation-nodes.spec.ts from run 42502728771, which failed on every browser.

Cause

  • Unlabelled textareas (app bug): In the automation builder, the "Comment" (Add comment) and "Message" (Send notification) labels were not associated with their textareas. The textareas' accessible name fell back to the placeholder, so getByRole("textbox", { name: "Comment" }) and { name: "Message" } never matched. This also hurt screen-reader users.
  • Ambiguous locator (test bug): getByRole("switch", { name: "Assignees" }) also matched "Parent task's assignees" (strict-mode violation).
  • Fragile assertion (test bug): the notification-bell check matched several notifications when more than one existed (e.g. on a retry or a rerun against the same admin account).

Changes

  • automation-node-config-panel.tsx: add htmlFor on the labels and matching ids on the Comment and Message textareas.
  • automation-nodes.spec.ts: use exact: true for the "Assignees" switch and .first() for the notification text.

Testing

  • automation-node-config-panel.test.tsx passes (9/9).
  • automation-nodes.spec.ts passes locally against a rebuilt e2e stack on chromium and mobile-chrome (36/36).
  • Not run locally: webkit, firefox, mobile-safari (not installed). CI will cover them.
  • The other scattered single-browser failures in that run (role-badges-selector, passkeys, interaction-views, etc.) were not investigated and may be flaky.

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes

  • Automation action label association: the add_comment and notify textareas in ActionConfigForm now carry ids matched by their Labels' htmlFor, giving both fields the accessible names ("Comment", "Message") the e2e spec already queried.
  • Automation e2e selectors: the Assignees recipient switch now uses exact: true (the "Parent task's assignees" label also substring-matches), and the notification-bell assertion uses .first() to tolerate duplicate matches.

ℹ️ Label association coverage in ActionConfigForm remains partial

The two added associations are correct, but most other labelled fields in the same component still render a bare <Label> with no htmlFor, so the accessibility improvement is narrower than the PR title implies. The trigger_ai_agent action is the clearest gap: its message Textarea renders directly under a <Label> exactly like the two fields fixed here.

Technical details
# Remaining unassociated labels in ActionConfigForm

## Affected sites
- `apps/web/src/components/projects/automation/automation-node-config-panel.tsx:2723` — `messageLabel` `<Label>` immediately followed by the `trigger_ai_agent` message `Textarea` (2740-ish in the same block); identical pattern to the two fields this PR fixed.
- `.../automation-node-config-panel.tsx:2956` — `waitMinutesLabel` + `Input`.
- `.../automation-node-config-panel.tsx:3164` / `:3242` — `urlLabel` + `Input`, `bodyLabel` + `Textarea` for the HTTP action.

## Required outcome
- Optional follow-up only: if the intent was form-wide coverage, associate the remaining native controls (`trigger_ai_agent` message, wait minutes, HTTP url/body, sprint name/goal) the same way this PR associates `add_comment` and `notify`.

## Open questions for the human
- Is the scope deliberately limited to the fields the e2e spec selects by accessible name, with the rest tracked separately?

Pullfrog  | View workflow run | Using deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

@pikann
pikann merged commit 1d2533c into master Nov 9, 2026
3 checks passed
@pikann
pikann deleted the fix/fix-failed-automation-node-e2e-testing branch November 9, 2026 04:11
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.

1 participant