[wp-trac] [WordPress Trac] #51628: add arg "aria-label" to wp_dropdown_categories
WordPress Trac
noreply at wordpress.org
Fri Dec 4 16:19:24 UTC 2020
#51628: add arg "aria-label" to wp_dropdown_categories
-------------------------------+----------------------------
Reporter: greghy | Owner: (none)
Type: enhancement | Status: closed
Priority: normal | Milestone:
Component: Themes | Version: 5.5
Severity: normal | Resolution: wontfix
Keywords: reporter-feedback | Focuses: accessibility
-------------------------------+----------------------------
Changes (by joedolson):
* status: new => closed
* resolution: => wontfix
* milestone: Awaiting Review =>
Comment:
Hi, @greghy! After discussion, this isn't something we're going to pursue.
There are a couple of reasons; mostly, there's a problem that an aria-
label attribute would always override any visible label, so this could
easily create a new issue with mismatched labeling, if somebody was trying
to add a visible label to a field that had been passed an aria-label.
Having a label on the field in a theme is easily resolved by using a
`.screen-reader-text` class to hide the label (or, of course, by leaving
it visible.)
The purpose of the function is just to generate the select list; any
labeling should be left to the usage.
If necessary, you could use the existing `wp_dropdown_cats` filter to
modify the output HTML.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51628#comment:6>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list