Opened 6 weeks ago
Last modified 10 days ago
#63531 accepted defect (bug)
Category dropdown does not meet WCAG 2.2 A on windows and some linux systems
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 6.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Widgets | Keywords: | needs-patch |
Focuses: | accessibility, javascript | Cc: |
Description
Using WP 6.8.1 on Windows 11 with up-to-date browsers in a brand new local WP build spun up for testing
- create a website using WordPress
- create some post categories
- create some posts and assign the posts to the categories
when using blocks
- add a categories block to a template
when using the classic widgets plugin
- add the categories widget to a side bar
- in Windows chrome or Firefox, or linux chromium navigate to the frontend page where the categories widget or block lives.
- Using a keyboard, tab to the categories dropdown (<select>) and hit enter to display the dropdown options
- Click arrow down to select an option
- Click escape
at this point the user is taken to the page of the category that was selected
to meet the WCAG criterion, the user should remain on the same page and the option cleared.
WCAG mentions Success Criterion 3.2.2 On Input
Changing the setting of any user interface component does not automatically cause a change of context unless the user has been advised of the behavior before using the component.
here is an example of a similar failure https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/F9
Keeping the currently selected option and not removing the selection seems like an OS-Specific behavior. I am not observing this behavior on OSX, but I do see it on Windows in chrome and firefox and in elementary OS in chromium
this appears to all come from the JS injected here
https://github.com/WordPress/WordPress/blob/master/wp-includes/blocks/categories.php#L100
https://github.com/WordPress/WordPress/blob/master/wp-includes/widgets/class-wp-widget-categories.php#L99
possible fixes are a big ole "GO" button (ick), or clearing the selection before the select.onChange is dispatched
Change History (5)
This ticket was mentioned in Slack in #core-test by jeannetteunifreiburg. View the logs.
6 weeks ago
This ticket was mentioned in Slack in #accessibility by joedolson. View the logs.
10 days ago
#5
@
10 days ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to 6.9
- Owner set to joedolson
- Status changed from new to accepted
This is a long known issue. But it's definitely worth addressing again, as browser handling of events has changed some since we last discussed it.
At this point, we may be able to simply change the event to trigger on onSelect
instead of onChange
. This will subtly break the past behavior, since the event will fire later, so it's possibly something we should ship early and monitor for feedback.
But it's something I've wanted to change for a long time, so I'm going to go ahead and milestone it and see what we can do.
Related: #40925