Fix accessibility issues found by Axe #1246
Merged
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.
What is this PR doing?
Fixes two accessibility issues found when scanning https://playground.wordpress.net (i.e., the generic instance) with axe DevTools.
See discussion in #612.
What problem is it solving?
Makes Playground more accessible.
How is the problem addressed?
Testing environment: Arc/Chromium with the Axe DevTools (axe-core version 4.8.4) extension. The Best Practice option is enabled.
Findings:
wp-admin-bar
hidden using CSS, found 4 issuesTwentytwentyfour
navigation hidden using CSS, found 2 issues. Only these last two are generated by Playground.Left: First scan. Right: Third scan:
Both issues affect Playground's address bar area:
Solutions:
To solve issue number 1, Form elements should have a visible label:
change the
title
attribute of<input class="_input_845jo_7" name="url" type="text" title="URL to visit in the WordPress site, like"/wp-admin"" autocomplete="off" value="/">
toaria-label
(i.e.,aria-label="URL to visit in the WordPress site, like"/wp-admin""
).To solve issue number 2, All page content should be contained by landmarks:
change
<div class="_toolbar_8xy06_95">...</div>
to<header aria-label="Playground toolbar" class="_toolbar_8xy06_95">...</header>
See screenshot after applying the changes:
Testing Instructions
Run a scan with axe DevTools (enable the Best Practice option)