close
Skip to content

Fix: Add accessible label to ability test payload textarea in Abiliti…#649

Merged
dkotter merged 2 commits into
WordPress:developfrom
Trushiv04:fix/abilities-explorer-textarea-label
Jun 3, 2026
Merged

Fix: Add accessible label to ability test payload textarea in Abiliti…#649
dkotter merged 2 commits into
WordPress:developfrom
Trushiv04:fix/abilities-explorer-textarea-label

Conversation

@Trushiv04

@Trushiv04 Trushiv04 commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

What?

Closes #648

Adds an accessible label to the JSON payload <textarea> in the Abilities Explorer test screen.

Why?

The test input <textarea id="ability-test-payload"> had no associated label, aria-label, or aria-labelledby. Screen readers announced only "text area" with no indication of the field's purpose, which is a WCAG 2.1 AA violation (SC 1.3.1 and SC 4.1.2).

How?

Added a visually hidden <label class="screen-reader-text"> before the textarea, linked via the for attribute matching the existing id. This uses WordPress's standard screen-reader-text pattern, so there is no visual change the label is only exposed to assistive technology.

Use of AI Tools

AI assistance: Yes
Tool(s): Claude
Used for: Identifying the issue location, and verifying coding standards. Final implementation and testing were done by me.

Testing Instructions

  1. Navigate to Tools → Abilities Explorer and open any ability's test view
  2. Focus the JSON payload textarea with a screen reader
  3. Confirm it announces "Ability test input (JSON)" instead of just "text area"
  4. Confirm there is no visual change to the textarea

Screenshots or screencast

Before
image
(screen reader announces "You are currently on a text area")

After
image
(screen reader announces "Ability test input (JSON), edit text")

Changelog Entry

Fixed - Added an accessible label to the ability test payload textarea in the Abilities Explorer.

Open WordPress Playground Preview

@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Trushiv04 <trushiv@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@codecov

codecov Bot commented Jun 3, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 74.57%. Comparing base (35be266) to head (666d797).

Files with missing lines Patch % Lines
...udes/Experiments/Abilities_Explorer/Admin_Page.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##             develop     #649      +/-   ##
=============================================
- Coverage      74.58%   74.57%   -0.01%     
  Complexity      1754     1754              
=============================================
  Files             85       85              
  Lines           7547     7548       +1     
=============================================
  Hits            5629     5629              
- Misses          1918     1919       +1     
Flag Coverage Δ
unit 74.57% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dkotter dkotter added this to the 1.1.0 milestone Jun 3, 2026
@dkotter dkotter merged commit 71ac4f4 into WordPress:develop Jun 3, 2026
21 of 24 checks passed
jorgefilipecosta pushed a commit that referenced this pull request Jun 15, 2026
…es Explorer (#649)

Fixed - Added an accessible label to the ability test payload textarea in the Abilities Explorer.

Co-authored-by: Trushiv04 <trushiv@git.wordpress.org>
Co-authored-by: dkotter <dkotter@git.wordpress.org>
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.

Ability test payload textarea in Abilities Explorer lacks an accessible name

2 participants