Repository navigation
feat: enhance accessibility by adding htmlFor attributes to labels in… - #716
Merged
Merged
Conversation
… ActionConfigForm
Contributor
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Automation action label association: the
add_commentandnotifytextareas inActionConfigFormnow carry ids matched by theirLabels'htmlFor, giving both fields the accessible names ("Comment", "Message") the e2e spec already queried. - Automation e2e selectors: the
Assigneesrecipient switch now usesexact: 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?deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fixes the e2e failures in
automation-nodes.spec.tsfrom run 42502728771, which failed on every browser.Cause
getByRole("textbox", { name: "Comment" })and{ name: "Message" }never matched. This also hurt screen-reader users.getByRole("switch", { name: "Assignees" })also matched "Parent task's assignees" (strict-mode violation).Changes
automation-node-config-panel.tsx: addhtmlForon the labels and matchingids on the Comment and Message textareas.automation-nodes.spec.ts: useexact: truefor the "Assignees" switch and.first()for the notification text.Testing
automation-node-config-panel.test.tsxpasses (9/9).automation-nodes.spec.tspasses locally against a rebuilt e2e stack on chromium and mobile-chrome (36/36).