WordPress / wporg-news-2021

The WordPress.org News Theme
https://wordpress.org/news/
31 stars 21 forks source link

Mismatch between perceived affordance and input used on Categories list #385

Open joedolson opened 2 years ago

joedolson commented 2 years ago

The control to expand the list of categories is designed to look like a button or link, but is actually a hidden checkbox. While this is functional, it's an unexpected interaction. Screen reader users will generally be able to figure it out, since they are informed of the type of element when they move focus to it, but sighted keyboard users will attempt to activate it using the Enter key. While some users may explore further and discover that it can be activated using the Space key, many users will simply assume it is broken.

This should either add a JS event handler to trigger the change on Enter, or should be shifted to use a more standard button toggle with aria-expanded, which would be a more expected interaction.