Improve admin UI accessibility - #1420
Open
murshed wants to merge 1 commit into
Open
Conversation
Enhance accessibility throughout the plugin check admin interface: - Add screen reader announcements for check status (starting, success, errors) - Improve CSS for screen-reader-text with clip-path and white-space - Use semantic HTML: convert table header <td> to <th scope="col"> - Fix legend text to display labels instead of IDs for better context - Correct escaping functions: esc_html_e() instead of esc_attr_e() for headings - Use textContent instead of innerText in JS for better practice - Add wp-a11y dependency for ARIA live regions - Remove duplicate spinner element - Improve html_entity_decode() with proper flags
|
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. |
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.
Enhance accessibility throughout the plugin check admin interface:
What?
This PR improves accessibility (WCAG compliance), HTML standards, screen reader notifications, and PHP 8+ compatibility across the Plugin Check admin UI and core libraries.
Why?
#plugin-check__spinner), unlocalized raw slug text in<legend>tags, and incorrect escaping functions (esc_attr_e()instead ofesc_html_e()).<thead>used non-semantic<td>cells rather than<th scope="col">cells.clipproperties without modernclip-path: inset(50%)andwhite-space: nowrap.innerTextinstead oftextContent, causing unnecessary browser style recalculations and reflows.html_entity_decode()inParser.phpwas missing explicit$flags, triggering PHP 8.1+ default parameter deprecation issues.How?
ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401flags tohtml_entity_decode()inincludes/Lib/Readme/Parser.php.plugin-check__spinnerelement intemplates/admin-page.php.<h4>tags to useesc_html_e().<legend>screen-reader text to display human-readable labels ($label) instead of raw slugs.<thead>cells from<td>to<th scope="col">intemplates/results-table.php.'wp-a11y'dependency toplugin-check-adminscript registration inincludes/Admin/Admin_Page.php.wp.a11y.speak()notifications inassets/js/plugin-check-admin.jsfor check startup, execution summary, and error reporting.innerText = ''withtextContent = ''for clearing results containers.assets/css/plugin-check-admin.csswithclip-path: inset(50%)andwhite-space: nowrap.Testing Instructions
<thead>cells use<th scope="col">.#plugin-check__spinnerIDs exist on the page.vendor/bin/phpcs --standard=PHPCompatibility --runtime-set testVersion 8.0-8.5and verify 0 compatibility errors.vendor/bin/phpcsandvendor/bin/phpstan analyseto verify linting and static analysis pass cleanly.AI Usage Disclosure
If AI tools were used, please describe how they were used:
Used AI coding agent to perform static analysis auditing for PHP 8+ compatibility, WCAG accessibility standards adherence, and automated linting verification.
Screenshots or screencast