Skip to content

Improve Accessibility and Functionality - #2598

Open
murshed wants to merge 3 commits into
WordPress:trunkfrom
murshed:trunk
Open

Improve Accessibility and Functionality#2598
murshed wants to merge 3 commits into
WordPress:trunkfrom
murshed:trunk

Conversation

@murshed

@murshed murshed commented Jul 27, 2026

Copy link
Copy Markdown

Summary

Addresses accessibility and security improvements across Performance Lab plugins.

This PR improves screen reader accessibility on the Performance Lab admin screen (WCAG 2.4.4 Link Purpose) by providing contextual aria-label attributes for action links and buttons. It also enforces security best practices by adding rel="noopener" to external links opening in new tabs (target="_blank").

Relevant technical choices

  • Accessible Action Links & Buttons (performance-lab): Added descriptive aria-label attributes to plugin card actions in perflab_render_plugin_card() (e.g., Activate {Plugin Name}, Settings for {Plugin Name}, {Plugin Name} is active) so screen reader users hear contextual labels instead of repetitive link text.
  • External Link Security (target="_blank" rel="noopener"): Added rel="noopener" to all external links opening in a new tab across performance-lab, speculation-rules, embed-optimizer, optimization-detective, and site-health audit helpers to prevent reverse-tabnabbing security risks.
  • Sanitization Array Updates: Updated wp_kses() allowed attributes arrays (such as in speculation-rules/settings.php) to permit 'rel' => array() on anchor tags.

murshed added 2 commits July 27, 2026 11:55
Add `rel="noopener"` attribute to all links with `target="_blank"` to prevent security vulnerabilities. Add aria-labels to buttons and links to improve screen reader support. Update wp_kses allowed attributes to include the 'rel' attribute where external links are used.
@github-actions

github-actions Bot commented Jul 27, 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: murshed <fahimmurshed@git.wordpress.org>
Co-authored-by: mukeshpanchal27 <mukesh27@git.wordpress.org>

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

@github-actions github-actions Bot added [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Plugin] Optimization Detective Issues for the Optimization Detective plugin [Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) [Plugin] Embed Optimizer Issues for the Embed Optimizer plugin (formerly Auto Sizes) labels Jul 27, 2026
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 30.43478% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.30%. Comparing base (0a51c32) to head (bbf4b80).
⚠️ Report is 3 commits behind head on trunk.

Files with missing lines Patch % Lines
plugins/performance-lab/includes/admin/plugins.php 0.00% 14 Missing ⚠️
plugins/embed-optimizer/helper.php 0.00% 1 Missing ⚠️
...e-lab/includes/site-health/webp-support/helper.php 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            trunk    #2598      +/-   ##
==========================================
- Coverage   70.35%   70.30%   -0.06%     
==========================================
  Files          91       91              
  Lines        7867     7876       +9     
==========================================
+ Hits         5535     5537       +2     
- Misses       2332     2339       +7     
Flag Coverage Δ
multisite 70.30% <30.43%> (-0.06%) ⬇️
single 35.15% <26.08%> (-0.02%) ⬇️

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

☔ View full report in Codecov by Harness.
📢 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.

@mukeshpanchal27 mukeshpanchal27 added [Type] Enhancement A suggestion for improvement of an existing feature no milestone PRs that do not have a defined milestone for release labels Jul 27, 2026

@mukeshpanchal27 mukeshpanchal27 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @murshed for the PR!

The changes look solid to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no milestone PRs that do not have a defined milestone for release [Plugin] Embed Optimizer Issues for the Embed Optimizer plugin (formerly Auto Sizes) [Plugin] Optimization Detective Issues for the Optimization Detective plugin [Plugin] Performance Lab Issue relates to work in the Performance Lab Plugin only [Plugin] Speculative Loading Issues for the Speculative Loading plugin (formerly Speculation Rules) [Type] Enhancement A suggestion for improvement of an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants