diff --git src/wp-content/themes/twentyseventeen/assets/js/customize-controls.js src/wp-content/themes/twentyseventeen/assets/js/customize-controls.js
index e6f6037a4d..c580a1501a 100644
|
|
|
19 | 19 | } |
20 | 20 | }; |
21 | 21 | |
| 22 | // The control-specific label is redundant because, visually, this control is part of the Color Scheme control. |
| 23 | control.container.find( '.customize-control-title:first' ).addClass( 'screen-reader-text' ); |
| 24 | |
22 | 25 | visibility(); |
23 | 26 | setting.bind( visibility ); |
24 | 27 | }); |
diff --git src/wp-content/themes/twentyseventeen/inc/customizer.php src/wp-content/themes/twentyseventeen/inc/customizer.php
index abc27fb057..07eca92c42 100644
|
|
function twentyseventeen_customize_register( $wp_customize ) { |
66 | 66 | $wp_customize->add_control( |
67 | 67 | new WP_Customize_Color_Control( |
68 | 68 | $wp_customize, 'colorscheme_hue', array( |
| 69 | 'label' => __( 'Hue', 'twentyseventeen' ), |
69 | 70 | 'mode' => 'hue', |
70 | 71 | 'section' => 'colors', |
71 | 72 | 'priority' => 6, |
diff --git src/wp-includes/customize/class-wp-customize-color-control.php src/wp-includes/customize/class-wp-customize-color-control.php
index dff593bb06..357cce0a52 100644
|
|
class WP_Customize_Color_Control extends WP_Customize_Control { |
89 | 89 | */ |
90 | 90 | public function content_template() { |
91 | 91 | ?> |
92 | | <# var defaultValue = '#RRGGBB', defaultValueAttr = '', |
| 92 | <# |
| 93 | var defaultValue = '#RRGGBB', |
| 94 | defaultValueAttr = '', |
| 95 | inputId = _.uniqueId( 'customize-color-control-input-' ), |
93 | 96 | isHueSlider = data.mode === 'hue'; |
| 97 | |
94 | 98 | if ( data.defaultValue && _.isString( data.defaultValue ) && ! isHueSlider ) { |
95 | 99 | if ( '#' !== data.defaultValue.substring( 0, 1 ) ) { |
96 | 100 | defaultValue = '#' + data.defaultValue; |
… |
… |
class WP_Customize_Color_Control extends WP_Customize_Control { |
98 | 102 | defaultValue = data.defaultValue; |
99 | 103 | } |
100 | 104 | defaultValueAttr = ' data-default-color=' + defaultValue; // Quotes added automatically. |
101 | | } #> |
| 105 | } |
| 106 | #> |
102 | 107 | <# if ( data.label ) { #> |
103 | 108 | <span class="customize-control-title">{{{ data.label }}}</span> |
104 | 109 | <# } #> |
… |
… |
class WP_Customize_Color_Control extends WP_Customize_Control { |
106 | 111 | <span class="description customize-control-description">{{{ data.description }}}</span> |
107 | 112 | <# } #> |
108 | 113 | <div class="customize-control-content"> |
109 | | <label><span class="screen-reader-text">{{{ data.label }}}</span> |
| 114 | <label for="{{ inputId }}"><span class="screen-reader-text">{{{ data.label }}}</span></label> |
| 115 | |
110 | 116 | <# if ( isHueSlider ) { #> |
111 | | <input class="color-picker-hue" type="text" data-type="hue" /> |
| 117 | <input id="{{ inputId }}" class="color-picker-hue" type="number" min="1" max="359" data-type="hue" /> |
112 | 118 | <# } else { #> |
113 | | <input class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} /> |
| 119 | <input id="{{ inputId }}" class="color-picker-hex" type="text" maxlength="7" placeholder="{{ defaultValue }}" {{ defaultValueAttr }} /> |
114 | 120 | <# } #> |
115 | | </label> |
116 | 121 | </div> |
117 | 122 | <?php |
118 | 123 | } |