[wp-trac] [WordPress Trac] #30706: Add aria-describedby to autofocused fields

WordPress Trac noreply at wordpress.org
Mon May 25 16:36:27 UTC 2015


#30706: Add aria-describedby to autofocused fields
--------------------------+--------------------------------------------
 Reporter:  joedolson     |       Owner:  azaozz
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.3
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:  accessibility, administration
--------------------------+--------------------------------------------

Comment (by joedolson):

 '''Notes''': it appears that the function `install_theme_search_form()`,
 which used autofocus is no longer used. It may be worthwhile to go through
 and remove the old code. When the theme search was replaced, it looks like
 all the `add_action()` calls in theme-install.php were just commented out,
 but the code hasn't been pulled out.

 Most of the uses of autofocus appear to be in the customizer or tinymce at
 this point; it appears that most of the search forms that used to take
 autofocus have been replaced in recent versions.

 In the customizer, I think that the button labels *may* be sufficiently
 clear, but confirmation of location would probably be valuable. For the
 header image, all that's read is "Add new image". You have just activated
 the link "Header", but confidence that you're in the right place would be
 beneficial.

 The background image is theoretically fine, because that control includes
 a label. But a `button` with a label only reads out the label, and not the
 button text.

 Patch adds an aria-label to the Header image button that gives context.

 I'm not sure where to go to address the background image. This could be
 solved by adding an aria-labelledby with two ID references - one to the
 label and one to the button. Or it could be solved with an aria-label that
 provided full context.

 The third autofocus area in core is the Widgets panel; right now, that
 doesn't really seem to do anything - focus is actually placed on the back
 button in the customizer, not the widgets panel. I think that if the
 section title received focus, that would be just fine.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30706#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list