Skip to content

HS-1653425 Add accessible name and id to ASR comment textarea#1849

Merged
wjames111 merged 2 commits into
mainfrom
hs-1653425
Jun 17, 2026
Merged

HS-1653425 Add accessible name and id to ASR comment textarea#1849
wjames111 merged 2 commits into
mainfrom
hs-1653425

Conversation

@wjames111

@wjames111 wjames111 commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Description

  • Adds a stable id (asr-additional-info) and a localized aria-label (Additional Information) to the Additional Salary Request "Additional Information / Optional Comments" textarea in ApprovalProcess.tsx.
  • This is the only <textarea> rendered in the ASR form, so QA automation was forced to use a brittle page.locator('textarea') selector. It can now target the field reliably via getByRole('textbox', { name: 'Additional Information' }) or #asr-additional-info.
  • No visual change to the form — attributes land directly on the underlying <textarea>.
  • Adds a test asserting the accessible name and id.

Related ticket: https://secure.helpscout.net/conversation/3357987199/1653425?viewId=8086747
Requested by QA Automation (CruGlobal/qa_automation PR #23, mpdx_playwright_tests/tests/asr/asrPage.js).

Testing

  • Open the Additional Salary Request form in HR Tools and proceed to the submit/approval step.
  • Inspect the "Additional Information" / "Optional Comments" textarea.
  • Check that the <textarea> element has id="asr-additional-info" and aria-label="Additional Information".
  • Confirm it is reachable via getByRole('textbox', { name: 'Additional Information' }).

Checklist:

  • I have given my PR a title with the format "MPDX-(JIRA#) (summary sentence max 80 chars)"
  • I have applied the appropriate labels (Add the label "Preview" to automatically create a preview environment)
  • I have run the Claude Code /pr-review command locally and fixed any relevant suggestions
  • I have requested a review from another person on the project
  • I have tested my changes in preview or in staging
  • I have cleaned up my commit history

🤖 Generated with Claude Code

The Additional Salary Request additional-info textarea had no label,
aria-label, or id, leaving QA automation to rely on a brittle
page.locator('textarea') selector. Add a stable id (asr-additional-info)
and a localized aria-label so it can be targeted via getByRole('textbox',
{ name: 'Additional Information' }) or #asr-additional-info.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Bundle sizes [mpdx-react]

Compared against 4199ea3

No significant changes found

@wjames111 wjames111 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Multi-Agent Code Review — Verdict: ✅ APPROVED WITH SUGGESTIONS

Mode: standard · Agents: Architecture, Testing, Standards, UX, Financial (domain) + cross-examination debate

Clean, well-tested, net-positive accessibility change. The comment textarea previously had no accessible name; this PR adds one plus a stable id, with a colocated test asserting both. No blockers. One medium-priority suggestion and a couple of minor nits, none of which block merge.

Risk

1/10 (LOW) · 2 files · +13 −1 · Reviewer level: ANY

Findings

Sev Tier Location Note
5.0 Medium ApprovalProcess.tsx:64-68 Prefer the label prop (as sibling ContactInformation.tsx does) over inputProps['aria-label'] — gives a visible, persistent label. Consistency/polish, not a defect.
3.5 Suggestion ApprovalProcess.test.tsx:102 Redundant toBeInTheDocument() after getByRole({ name }). Harmless.
2.5 Suggestion ApprovalProcess.tsx:65 Static hardcoded id — low duplicate-id risk (instances don't co-mount).

Notes

  • Dependency surface: ApprovalProcess also renders in CalculationReports/SubmitModal.tsx:95 (SalaryCalculator), not just the three ASR FormVersions — but no two instances co-mount, so the static id doesn't collide.
  • Financial agent: No financial/currency/aggregation code despite the AdditionalSalaryRequest/ path trigger.
  • Standards: All applicable checklist items PASS (named export, localized aria-label, no any/new Date()/debug output).
  • Debate: UX initially rated the label-mechanism issue 6.5; after cross-examination both UX and Architecture converged on ~5.0 (it over-penalized what is a net a11y improvement, and WCAG 2.5.3 doesn't actually trigger since there's no visible label text).

Severity < 7 findings can be dismissed by replying /dismiss: <reason> on the inline comment.

@github-actions github-actions 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.

AI Review Auto-Approval

Risk Level: LOW (1/10)
Verdict: APPROVED_WITH_SUGGESTIONS (suggestions posted, no blockers)

This PR was auto-approved because:

  • The multi-agent AI review determined it is low risk
  • No blocking issues were found
  • All suggestions have been posted as review comments for the developer to consider

If you believe this PR needs human review, dismiss this approval and request a review manually.

@wjames111 wjames111 enabled auto-merge (squash) June 17, 2026 19:44
@wjames111 wjames111 self-assigned this Jun 17, 2026
@wjames111 wjames111 added On Staging Will be merged to the staging branch by Github Actions Preview Environment Add this label to create an Amplify Preview labels Jun 17, 2026
@wjames111 wjames111 disabled auto-merge June 17, 2026 19:44
@github-actions

Copy link
Copy Markdown
Contributor

Preview branch generated at https://hs-1653425.d3dytjb8adxkk5.amplifyapp.com

@wjames111 wjames111 merged commit b969697 into main Jun 17, 2026
66 checks passed
@wjames111 wjames111 deleted the hs-1653425 branch June 17, 2026 19:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

On Staging Will be merged to the staging branch by Github Actions Preview Environment Add this label to create an Amplify Preview

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant