[wp-trac] [WordPress Trac] #30738: JS content templates for base WP_Customize_Control

WordPress Trac noreply at wordpress.org
Sun May 7 14:25:27 UTC 2017


#30738: JS content templates for base WP_Customize_Control
-------------------------------------+-------------------------------------
 Reporter:  celloexpressions         |       Owner:  westonruter
     Type:  enhancement              |      Status:  accepted
 Priority:  normal                   |   Milestone:  4.8
Component:  Customize                |     Version:  4.1
 Severity:  normal                   |  Resolution:
 Keywords:  needs-unit-tests needs-  |     Focuses:  accessibility,
  patch                              |  javascript, rest-api
-------------------------------------+-------------------------------------
Changes (by afercia):

 * focuses:  javascript, rest-api => accessibility, javascript, rest-api


Comment:

 Couple of considerations:

 '''Labels'''
 As per [https://make.wordpress.org/core/handbook/best-practices/coding-
 standards/accessibility-coding-standards/#labeling the Accessibility
 coding standards], all new code must use an explicitly associated label,
 that is the ones that don't wrap the associated element and use for/id
 attributes.

 '''get_input_attrs()'''
 It would be great to make this a general utility to be re-used in other
 places too, with an option to get or echo or two separate functions for
 that. See for example something very similar planned to be used for the
 Settings API revamping ongoing effort on GitHub:
 https://github.com/wpaccessibility/settings-api-
 enhanced/blob/50a91ffba9ef857f9b40010b1d8b3684ef645ae4/wp-
 admin/includes/template.php#L635

 /cc @flixos90

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


More information about the wp-trac mailing list