#53510 closed defect (bug) (fixed)
The category block lacks a label when displayed as dropdown
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | 5.0 |
Component: | Widgets | Keywords: | 2nd-opinion close |
Focuses: | accessibility | Cc: |
Description
The category block is supposed to replace the category widget, however the accessibility label is missing in the block.
Here is the interesting part of the widget output:
<form action="http://monsite.com" method="get"> <label class="screen-reader-text" for="cat">Categories</label> <select name="cat" id="cat" class="postform"> <option value="-1">Select Category</option> <option class="level-0" value="277">Cat</option> <option class="level-0" value="1">Uncategorized</option> </select> </form>
An acessibility label is present.
Here is the output for the corresponding block (I removed the javascript part as it is useless for the demonstration):
<div class="wp-block-categories-dropdown wp-block-categories"> <select name="cat" id="wp-block-categories-1" class="postform"> <option value="-1">Select Category</option> <option class="level-0" value="277">Cat</option> <option class="level-0" value="1">Uncategorized</option> </select> </div>
There is no accessibility label.
Change History (11)
This ticket was mentioned in Slack in #accessibility by desrosj. View the logs.
4 years ago
#5
@
4 years ago
- Keywords 2nd-opinion added
- Milestone changed from Awaiting Review to 5.8
It seems possible to me that the label in the block editor may have only ever been implemented in the admin, and not on the front-end. If so, that's something that will need to be addressed, but it's not a regression in the editor.
However, since this is changing what's produced on the front end for widgets, then that *is* a regression in the accessibility of the dropdown widgets, and needs to be fixed.
Looks like a change that needs to happen here:
Would appreciate somebody more comfortable with Gutenberg confirming this.
This ticket was mentioned in Slack in #core-editor by desrosj. View the logs.
4 years ago
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
4 years ago
#8
@
4 years ago
I made a pull-request to fix this issue https://github.com/WordPress/gutenberg/pull/33060.
#9
@
4 years ago
- Keywords close added
@joedolson The PR referenced above was merged into trunk
in [51261]. Could you give this another round of testing to confirm the issue is resolved?
#10
@
4 years ago
- Resolution set to fixed
- Status changed from new to closed
Confirmed fixed in trunk. Thanks @hugod and @desrosj!
Looks like this needs to be reported into the Gutenberg repository; the interface appears to have lost some of the functionality previously fixed.