Skip to content

Playground block: A11Y: Use better labels for buttons #288

@alexstine

Description

@alexstine

Test page: https://learn.wordpress.org/test/wordpress-playground-block-plugin-test-page/

The following buttons could use better labels.

  • index.php
  • PHP error_log

It is not clear that these buttons will switch the code editor view. Suggestions:

  • File: index.php
  • Read-only file: PHP error_log

Since these are functioning similarly to tabs, I would also mark the active one. You can use aria-current="true". This attribute must also be toggled with JavaScript with onClick event or similar.

Docs:

  1. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-current
  2. https://a11ysupport.io/tech/aria/aria-current_attribute

Metadata

Metadata

Assignees

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions