Fix: Add accessible labels to ToggleControl in Connector Approvals matrix#637
Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #637 +/- ##
==========================================
Coverage 74.58% 74.58%
Complexity 1754 1754
==========================================
Files 85 85
Lines 7547 7547
==========================================
Hits 5629 5629
Misses 1918 1918
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Hi @ishitaj34, thanks for jumping on this so quickly! I also have a fix ready — happy to review your PR #637 and provide feedback. |
|
Thanks @Trushiv04 ! |
|
Reviewed the changes the approach looks correct to me. |
|
Hi @ishitaj34, I noticed the Plugin Check and E2E tests are failing. git fetch upstream This should resolve any conflicts and potentially fix the failing checks. |
|
@Trushiv04 Thanks for that. I did sync with the latest |
|
I looked into both failing checks: E2E test ( Plugin Check: The log shows Syncing with the latest |
Plugin Check is a known failure due to upstream problems so we're fine there. But for the failing E2E test, I did verify our tests pass on In doing some quick testing, pretty sure it's failing here: ai/tests/e2e/specs/experiments/connector-approval.spec.js Lines 87 to 100 in f435d19 I think that code is now matching due to the labels added in this PR. Two things:
|
|
@dkotter Thanks for looking into it. I see what you mean about the row matching now. I'll take a look at using a screen reader-only label approach and retest it. |
|
Hi @dkotter |
…trix (#637) Fixed - Add descriptive accessible labels to approval matrix toggle controls. Co-authored-by: ishitaj34 <ishitaj34@git.wordpress.org> Co-authored-by: Trushiv04 <trushiv@git.wordpress.org> Co-authored-by: dkotter <dkotter@git.wordpress.org>
What?
Closes #634
Adds descriptive accessible labels to the approval matrix toggle controls in
ApprovalMatrixCard.tsx.Why?
The toggle controls were rendered with label="", resulting in checkboxes with no accessible name. Screen reader users could not determine which caller and connector each toggle controlled.
How?
Replaces the empty label with a descriptive, translatable label using the caller and connector names using
Allow %1$s to use %2$s, which provides each toggle with an accessible name.Use of AI Tools
AI assistance: Yes
Tool(s): ChatGPT
Model(s): GPT-5.5
Used for: Review of implementation approach. Implementation and testing completed and verified manually.
Testing Instructions
Changelog Entry