diff --git src/wp-admin/css/common.css src/wp-admin/css/common.css
index 0ffe623..cf5f6b7 100644
|
|
img { |
2985 | 2985 | |
2986 | 2986 | /* Metabox collapse arrow indicators */ |
2987 | 2987 | .js .sidebar-name .sidebar-name-arrow:before, |
2988 | | .js .meta-box-sortables .postbox .toggle-indicator:before { |
2989 | | content: "\f142"; |
| 2988 | .js .meta-box-sortables .postbox .toggle-indicator:before, |
| 2989 | .js .accordion-section .handlediv .sidebar-name-arrow:before { |
2990 | 2990 | display: inline-block; |
2991 | 2991 | font: normal 20px/1 dashicons; |
2992 | 2992 | speak: none; |
… |
… |
img { |
2995 | 2995 | text-decoration: none !important; |
2996 | 2996 | } |
2997 | 2997 | |
2998 | | .js .widgets-holder-wrap.closed .sidebar-name-arrow:before, |
2999 | | .js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before { |
3000 | | content: "\f140"; |
| 2998 | /* Open state */ |
| 2999 | .js .sidebar-name .sidebar-name-arrow:before, |
| 3000 | .js .meta-box-sortables .postbox .toggle-indicator:before, |
| 3001 | .js .accordion-section.open .handlediv .sidebar-name-arrow:before { |
| 3002 | content: "\f142"; |
3001 | 3003 | } |
3002 | 3004 | |
3003 | | .js .sidebar-name .sidebar-name-arrow:before { |
3004 | | padding: 10px; |
3005 | | left: 0; |
| 3005 | /* Closed state */ |
| 3006 | .js .widgets-holder-wrap.closed .sidebar-name-arrow:before, |
| 3007 | .js .meta-box-sortables .postbox.closed .handlediv .toggle-indicator:before, |
| 3008 | .js .accordion-section .handlediv .sidebar-name-arrow:before { |
| 3009 | content: "\f140"; |
3006 | 3010 | } |
3007 | 3011 | |
3008 | 3012 | .js #widgets-left .sidebar-name .sidebar-name-arrow { |
… |
… |
img { |
3041 | 3045 | 0 0 2px 1px rgba(30, 140, 190, .8); |
3042 | 3046 | } |
3043 | 3047 | |
| 3048 | .js .metabox-holder .accordion-section .accordion-section-title:after { |
| 3049 | content: none; |
| 3050 | } |
| 3051 | |
| 3052 | .js .metabox-holder .accordion-section .handlediv { |
| 3053 | float: right; |
| 3054 | position: relative; |
| 3055 | top: 11px; |
| 3056 | margin-right: 11px; |
| 3057 | z-index: 2; |
| 3058 | } |
| 3059 | |
| 3060 | .js .metabox-holder .accordion-section .handlediv .sidebar-name-arrow:before { |
| 3061 | width: 20px; |
| 3062 | border-radius: 50%; |
| 3063 | text-indent: -1px; /* account for the dashicon alignment */ |
| 3064 | } |
| 3065 | |
| 3066 | .js .metabox-holder .accordion-section .handlediv:focus { |
| 3067 | outline: none; |
| 3068 | border: none; |
| 3069 | box-shadow: none; |
| 3070 | } |
| 3071 | |
| 3072 | .js .metabox-holder .accordion-section .handlediv:focus .sidebar-name-arrow:before { |
| 3073 | box-shadow: |
| 3074 | 0 0 0 1px #5b9dd9, |
| 3075 | 0 0 2px 1px rgba(30, 140, 190, .8); |
| 3076 | } |
| 3077 | |
3044 | 3078 | /* @todo: appears to be Press This only and overridden */ |
3045 | 3079 | #photo-add-url-div input[type="text"] { |
3046 | 3080 | width: 300px; |
… |
… |
img { |
3136 | 3170 | .nav-menus-php .item-edit:before, |
3137 | 3171 | .widget-top a.widget-action:after, |
3138 | 3172 | .control-section .accordion-section-title:after, |
3139 | | .accordion-section-title:after { |
| 3173 | .accordion-section-title:after, |
| 3174 | .accordion-section-arrow:after { |
3140 | 3175 | right: 0; |
3141 | 3176 | content: "\f140"; |
3142 | 3177 | border: none; |
… |
… |
img { |
3184 | 3219 | } |
3185 | 3220 | |
3186 | 3221 | .widget-top a.widget-action:focus:after { |
3187 | | -webkit-box-shadow: |
3188 | | 0 0 0 1px #5b9dd9, |
3189 | | 0 0 2px 1px rgba(30,140,190,.8); |
3190 | 3222 | box-shadow: |
3191 | 3223 | 0 0 0 1px #5b9dd9, |
3192 | 3224 | 0 0 2px 1px rgba(30,140,190,.8); |
… |
… |
img { |
3202 | 3234 | .control-section.open .accordion-section-title:after, |
3203 | 3235 | #customize-info.open .accordion-section-title:after, |
3204 | 3236 | .nav-menus-php .menu-item-edit-active .item-edit:before, |
3205 | | .widget.open .widget-top a.widget-action:after { |
| 3237 | .widget.open .widget-top a.widget-action:after, |
| 3238 | .open .accordion-section-arrow:after { |
3206 | 3239 | content: "\f142"; |
3207 | 3240 | } |
3208 | 3241 | |
diff --git src/wp-admin/css/widgets.css src/wp-admin/css/widgets.css
index f0be076..ce7f236 100644
|
|
|
91 | 91 | box-sizing: border-box; |
92 | 92 | } |
93 | 93 | |
94 | | .sidebar-name-arrow { |
95 | | position: absolute; |
96 | | top: 0; |
97 | | right: 0; |
98 | | bottom: 0; |
| 94 | .js .sidebar-name .handlediv { |
| 95 | float: right; |
| 96 | width: 48px; |
| 97 | height: 48px; |
| 98 | padding: 0; |
| 99 | } |
| 100 | |
| 101 | .js .sidebar-name .handlediv:focus { |
| 102 | box-shadow: none; |
| 103 | outline: none; |
| 104 | } |
| 105 | |
| 106 | .js .sidebar-name .handlediv:focus .sidebar-name-arrow:before { |
| 107 | box-shadow: |
| 108 | 0 0 0 1px #5b9dd9, |
| 109 | 0 0 2px 1px rgba(30, 140, 190, .8); |
| 110 | } |
| 111 | |
| 112 | .js .sidebar-name .sidebar-name-arrow:before { |
| 113 | margin-top: 4px; |
| 114 | width: 20px; |
| 115 | border-radius: 50%; |
| 116 | text-indent: -1px; /* account for the dashicon alignment */ |
99 | 117 | } |
100 | 118 | |
101 | 119 | .js .sidebar-name { |
… |
… |
div#widgets-right .sidebar-name h3 { |
249 | 267 | padding: 15px 7px; |
250 | 268 | } |
251 | 269 | |
252 | | div#widgets-right .sidebar-name .sidebar-name-arrow:before { |
253 | | top: 2px; |
254 | | } |
255 | | |
256 | 270 | div#widgets-right .widget-top { |
257 | 271 | padding: 0; |
258 | 272 | } |
diff --git src/wp-admin/includes/template.php src/wp-admin/includes/template.php
index cc590e3..c4ba907 100644
|
|
function do_accordion_sections( $screen, $context, $object ) { |
1148 | 1148 | } |
1149 | 1149 | ?> |
1150 | 1150 | <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'] ); ?>"> |
1151 | | <h3 class="accordion-section-title hndle" tabindex="0"> |
| 1151 | <button type="button" class="handlediv button-link" aria-expanded="true"> |
| 1152 | <span class="screen-reader-text"><?php echo sprintf( __( 'Toggle panel: %s' ), $sidebar_name ); ?></span> |
| 1153 | <span class="sidebar-name-arrow" aria-hidden="true"></span> |
| 1154 | </button> |
| 1155 | <h3 class="accordion-section-title"> |
1152 | 1156 | <?php echo esc_html( $box['title'] ); ?> |
1153 | | <span class="screen-reader-text"><?php _e( 'Press return or enter to open this section' ); ?></span> |
1154 | 1157 | </h3> |
1155 | 1158 | <div class="accordion-section-content <?php postbox_classes( $box['id'], $page ); ?>"> |
1156 | 1159 | <div class="inside"> |
diff --git src/wp-admin/includes/widgets.php src/wp-admin/includes/widgets.php
index 746a892..b54f83f 100644
|
|
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 |
… |
… |
function wp_widget_control( $sidebar_args ) { |
278 | 281 | */ |
279 | 282 | function wp_widgets_access_body_class($classes) { |
280 | 283 | return "$classes widgets_access "; |
281 | | } |
282 | | No newline at end of file |
| 284 | } |
diff --git src/wp-admin/js/accordion.js src/wp-admin/js/accordion.js
index af62815..6eb919a 100644
|
|
|
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 | } |