Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit template button fails WCAG SC 2.5.3: Label in name #47335

Closed
joedolson opened this issue Jan 23, 2023 · 1 comment · Fixed by #47343
Closed

Edit template button fails WCAG SC 2.5.3: Label in name #47335

joedolson opened this issue Jan 23, 2023 · 1 comment · Fixed by #47343
Assignees
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).

Comments

@joedolson
Copy link
Contributor

Description

In full site editing, the button with the visible text 'Edit' in templates has the accessible name "Open the editor" (provided by an aria-label.)

The Label in Name rule requires that user interface components containing text include that text as part of the accessible name of the component. While this meets that rule from a string partial perspective, it does not from a user perspective, because 'edit' and 'editor' are different parts of speech.

It is also always preferable that the accessible name begins with the visible text, and that the part of speech matches the visible text. In this control, the visible active verb & first word is 'Edit', but the accessible verb and first word is 'Open'.

Recommendation: remove the aria-label attribute.

Step-by-step reproduction instructions

Open the site Editor.
Inspect the 'Edit' button
Note that the aria-label is 'Open the Editor'.

Screenshots, screen recording, code snippet

No response

Environment info

Gutenberg 15.0

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@joedolson joedolson added [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). [a11y] Labelling labels Jan 23, 2023
@carolinan carolinan self-assigned this Jan 23, 2023
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jan 23, 2023
@annezazu
Copy link
Contributor

Thanks for already getting this underway, Carolina, and for testing, Joe!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants