diff --git a/src/wp-admin/css/common.css b/src/wp-admin/css/common.css
index 44171d060f..e6cfd782be 100644
a
|
b
|
img { |
3078 | 3078 | /* Metabox collapse arrow indicators */ |
3079 | 3079 | .js .sidebar-name .sidebar-name-arrow:before, |
3080 | 3080 | .js .meta-box-sortables .postbox .toggle-indicator:before, |
3081 | | .bulk-action-notice .toggle-indicator:before { |
3082 | | content: "\f142"; |
| 3081 | .bulk-action-notice .toggle-indicator:before, |
| 3082 | .js .accordion-section .handlediv .sidebar-name-arrow:before { |
3083 | 3083 | display: inline-block; |
3084 | 3084 | font: normal 20px/1 dashicons; |
3085 | 3085 | speak: none; |
… |
… |
img { |
3088 | 3088 | text-decoration: none !important; |
3089 | 3089 | } |
3090 | 3090 | |
| 3091 | /* Open state */ |
| 3092 | .js .sidebar-name .sidebar-name-arrow:before, |
| 3093 | .js .meta-box-sortables .postbox .toggle-indicator:before, |
| 3094 | .bulk-action-notice .toggle-indicator:before, |
| 3095 | .js .accordion-section.open .handlediv .sidebar-name-arrow:before { |
| 3096 | content: "\f142"; |
| 3097 | } |
| 3098 | |
| 3099 | /* Closed state */ |
3091 | 3100 | .js .widgets-holder-wrap.closed .sidebar-name-arrow:before, |
3092 | 3101 | .js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before, |
3093 | | .bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before { |
| 3102 | .bulk-action-notice .bulk-action-errors-collapsed .toggle-indicator:before, |
| 3103 | .js .accordion-section .handlediv .sidebar-name-arrow:before { |
3094 | 3104 | content: "\f140"; |
3095 | 3105 | } |
3096 | 3106 | |
3097 | | .js .sidebar-name .sidebar-name-arrow:before { |
3098 | | padding: 10px; |
3099 | | left: 0; |
3100 | | } |
3101 | | |
3102 | 3107 | .js #widgets-left .sidebar-name .sidebar-name-arrow { |
3103 | 3108 | display: none; |
3104 | 3109 | } |
… |
… |
img { |
3141 | 3146 | 0 0 2px 1px rgba(30, 140, 190, .8); |
3142 | 3147 | } |
3143 | 3148 | |
| 3149 | .js .metabox-holder .accordion-section .accordion-section-title:after { |
| 3150 | content: none; |
| 3151 | } |
| 3152 | |
| 3153 | .js .metabox-holder .accordion-section .handlediv { |
| 3154 | float: right; |
| 3155 | position: relative; |
| 3156 | top: 11px; |
| 3157 | margin-right: 11px; |
| 3158 | z-index: 2; |
| 3159 | } |
| 3160 | |
| 3161 | .js .metabox-holder .accordion-section .handlediv .sidebar-name-arrow:before { |
| 3162 | width: 20px; |
| 3163 | border-radius: 50%; |
| 3164 | text-indent: -1px; /* account for the dashicon alignment */ |
| 3165 | } |
| 3166 | |
| 3167 | .js .metabox-holder .accordion-section .handlediv:focus { |
| 3168 | outline: none; |
| 3169 | border: none; |
| 3170 | box-shadow: none; |
| 3171 | } |
| 3172 | |
| 3173 | .js .metabox-holder .accordion-section .handlediv:focus .sidebar-name-arrow:before { |
| 3174 | box-shadow: |
| 3175 | 0 0 0 1px #5b9dd9, |
| 3176 | 0 0 2px 1px rgba(30, 140, 190, .8); |
| 3177 | } |
| 3178 | |
3144 | 3179 | /* @todo: appears to be Press This only and overridden */ |
3145 | 3180 | #photo-add-url-div input[type="text"] { |
3146 | 3181 | width: 300px; |
… |
… |
img { |
3238 | 3273 | .nav-menus-php .item-edit:before, |
3239 | 3274 | .widget-top .widget-action .toggle-indicator:before, |
3240 | 3275 | .control-section .accordion-section-title:after, |
3241 | | .accordion-section-title:after { |
| 3276 | .accordion-section-title:after, |
| 3277 | .accordion-section-arrow:after { |
| 3278 | right: 0; |
3242 | 3279 | content: "\f140"; |
3243 | 3280 | font: normal 20px/1 dashicons; |
3244 | 3281 | speak: none; |
… |
… |
img { |
3298 | 3335 | .control-section.open .accordion-section-title:after, |
3299 | 3336 | #customize-info.open .accordion-section-title:after, |
3300 | 3337 | .nav-menus-php .menu-item-edit-active .item-edit:before, |
3301 | | .widget.open .widget-top .widget-action .toggle-indicator:before { |
| 3338 | .widget.open .widget-top .widget-action .toggle-indicator:before, |
| 3339 | .open .accordion-section-arrow:after { |
3302 | 3340 | content: "\f142"; |
3303 | 3341 | } |
3304 | 3342 | |
diff --git a/src/wp-admin/css/widgets.css b/src/wp-admin/css/widgets.css
index d06fc29f70..099bb7fb7d 100644
a
|
b
|
|
193 | 193 | box-sizing: border-box; |
194 | 194 | } |
195 | 195 | |
196 | | .sidebar-name-arrow { |
197 | | position: absolute; |
198 | | top: 0; |
199 | | right: 0; |
200 | | bottom: 0; |
| 196 | .js .sidebar-name .handlediv { |
| 197 | float: right; |
| 198 | width: 32px; |
| 199 | height: 32px; |
| 200 | padding: 0; |
| 201 | } |
| 202 | |
| 203 | .js .sidebar-name .handlediv:focus { |
| 204 | box-shadow: none; |
| 205 | outline: none; |
| 206 | } |
| 207 | |
| 208 | .js #widgets-left .sidebar-name .handlediv:focus .sidebar-name-arrow { |
| 209 | display: block; |
| 210 | } |
| 211 | |
| 212 | .js .sidebar-name .handlediv:focus .sidebar-name-arrow:before { |
| 213 | box-shadow: |
| 214 | 0 0 0 1px #5b9dd9, |
| 215 | 0 0 2px 1px rgba(30, 140, 190, .8); |
| 216 | } |
| 217 | |
| 218 | .js .sidebar-name .sidebar-name-arrow:before { |
| 219 | margin-top: 14px; |
| 220 | width: 20px; |
| 221 | border-radius: 50%; |
| 222 | text-indent: -1px; /* account for the dashicon alignment */ |
| 223 | } |
| 224 | |
| 225 | .js .widget-liquid-left .sidebar-name .sidebar-name-arrow:before { |
| 226 | margin-top: 7px; |
201 | 227 | } |
202 | 228 | |
203 | 229 | .js .sidebar-name { |
… |
… |
div#widgets-left .sidebar-name h3 { |
258 | 284 | margin: 0 10px 0 0; |
259 | 285 | } |
260 | 286 | |
261 | | #widgets-left .sidebar-name .sidebar-name-arrow:before { |
262 | | padding: 9px; |
263 | | } |
264 | | |
265 | 287 | #widgets-left .widgets-holder-wrap, |
266 | 288 | div#widgets-left .widget-holder { |
267 | 289 | background: transparent; |
… |
… |
div#widgets-right .sidebar-name h3 { |
351 | 373 | padding: 15px 7px; |
352 | 374 | } |
353 | 375 | |
354 | | div#widgets-right .sidebar-name .sidebar-name-arrow:before { |
355 | | top: 2px; |
356 | | } |
357 | | |
358 | 376 | div#widgets-right .widget-top { |
359 | 377 | padding: 0; |
360 | 378 | } |
diff --git a/src/wp-admin/includes/template.php b/src/wp-admin/includes/template.php
index 87236d4846..2620dac74c 100644
a
|
b
|
function do_accordion_sections( $screen, $context, $object ) { |
1161 | 1161 | } |
1162 | 1162 | ?> |
1163 | 1163 | <li class="control-section accordion-section <?php echo $hidden_class; ?> <?php echo $open_class; ?> <?php echo esc_attr( $box['id'] ); ?>" id="<?php echo esc_attr( $box['id'] ); ?>"> |
1164 | | <h3 class="accordion-section-title hndle" tabindex="0"> |
| 1164 | <button type="button" class="handlediv button-link" aria-expanded="true"> |
| 1165 | <span class="screen-reader-text"><?php echo sprintf( __( 'Toggle panel: %s' ), esc_html( $box['title'] ) ); ?></span> |
| 1166 | <span class="sidebar-name-arrow" aria-hidden="true"></span> |
| 1167 | </button> |
| 1168 | <h3 class="accordion-section-title hndle"> |
1165 | 1169 | <?php echo esc_html( $box['title'] ); ?> |
1166 | | <span class="screen-reader-text"><?php _e( 'Press return or enter to open this section' ); ?></span> |
1167 | 1170 | </h3> |
1168 | 1171 | <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>"> |
1169 | 1172 | <div class="inside"> |
diff --git a/src/wp-admin/includes/widgets.php b/src/wp-admin/includes/widgets.php
index e6af6e7677..408165c8be 100644
a
|
b
|
function wp_list_widget_controls( $sidebar, $sidebar_name = '' ) { |
80 | 80 | if ( $sidebar_name ) { |
81 | 81 | ?> |
82 | 82 | <div class="sidebar-name"> |
83 | | <div class="sidebar-name-arrow"><br /></div> |
| 83 | <button type="button" class="handlediv button-link" aria-expanded="true"> |
| 84 | <span class="screen-reader-text"><?php echo sprintf( __( 'Toggle panel: %s' ), $sidebar_name ); ?></span> |
| 85 | <span class="sidebar-name-arrow" aria-hidden="true"></span> |
| 86 | </button> |
84 | 87 | <h2><?php echo esc_html( $sidebar_name ); ?> <span class="spinner"></span></h2> |
85 | 88 | </div> |
86 | 89 | <?php |
diff --git a/src/wp-admin/js/accordion.js b/src/wp-admin/js/accordion.js
index af6281546f..6eb919aa8b 100644
a
|
b
|
|
33 | 33 | $( document ).ready( function () { |
34 | 34 | |
35 | 35 | // Expand/Collapse accordion sections on click. |
36 | | $( '.accordion-container' ).on( 'click keydown', '.accordion-section-title', function( e ) { |
| 36 | $( '.accordion-container' ).on( 'click keydown', '.accordion-section-title, .handlediv', function( e ) { |
37 | 37 | if ( e.type === 'keydown' && 13 !== e.which ) { // "return" key |
38 | 38 | return; |
39 | 39 | } |
diff --git a/src/wp-admin/widgets.php b/src/wp-admin/widgets.php
index db4459b387..ade84bbdb1 100644
a
|
b
|
|
387 | 387 | <div id="widgets-left"> |
388 | 388 | <div id="available-widgets" class="widgets-holder-wrap"> |
389 | 389 | <div class="sidebar-name"> |
390 | | <div class="sidebar-name-arrow"><br /></div> |
| 390 | <button type="button" class="handlediv button-link" aria-expanded="true"> |
| 391 | <span class="screen-reader-text">Toggle panel: <?php _e( 'Available Widgets' ); ?></span> |
| 392 | <span class="sidebar-name-arrow" aria-hidden="true"></span> |
| 393 | </button> |
391 | 394 | <h2><?php _e( 'Available Widgets' ); ?> <span id="removing-widget"><?php _ex( 'Deactivate', 'removing-widget' ); ?> <span></span></span></h2> |
392 | 395 | </div> |
393 | 396 | <div class="widget-holder"> |