Ticket #34439: 34439.2.patch
File 34439.2.patch, 3.9 KB (added by , 9 years ago) |
---|
-
src/wp-admin/js/common.js
906 906 aria_button_if_js(); 907 907 }); 908 908 909 /** 910 * Toggle buttons to toggle elements using additional ARIA semantics. 911 * 912 * Proper markup with proper attributes will work out of the box. 913 * Use the following markup example for the toggle button: 914 * 915 * <button type="button" class="button button-toggle-aria-expanded" aria-expanded="false" aria-owns="id-of-the-element-to-toggle">translatable button text</button> 916 * 917 * Use the following markup for the element to be toggled. Ideally, the owned 918 * element should be right after the toggle control. It can also be placed 919 * anywhere in the source thanks to the `aria-owns` attribute but please 920 * consider that at the time of writing (Dec. 2015) only a few assistive 921 * technologies offer a shortcut to jump directly to the owned element. 922 * 923 * <div id="id-of-the-element-to-toggle"></div> 924 */ 925 $( '.button-toggle-aria-expanded' ).on( 'click', function() { 926 var toggleBtn = $( this ); 927 $( '#' + toggleBtn.attr( 'aria-owns' ) ).toggle( 0, function() { 928 toggleBtn.attr( 'aria-expanded', $( this ).is( ':visible' ) ); 929 }); 930 } ); 931 909 932 window.wpResponsive.init(); 910 933 setPinMenu(); 911 934 currentMenuItemHasPopup(); -
src/wp-admin/network/themes.php
195 195 <?php submit_button( __( 'No, return me to the theme list' ), 'button', 'submit', false ); ?> 196 196 </form> 197 197 198 <p> <a href="#" onclick="jQuery('#files-list').toggle(); return false;"><?php _e('Click to view entire list of files which will be deleted'); ?></a></p>199 <div id="files-list" style="display:none;">200 <ul class="code">201 <?php202 foreach ( (array) $files_to_delete as $file ) {203 echo '<li>' . esc_html( str_replace( WP_CONTENT_DIR . '/themes', '', $file ) ) . '</li>';204 }205 ?>206 </ul>207 </ div>198 <p> 199 <button type="button" class="button-link button-toggle-aria-expanded" aria-expanded="false" aria-owns="files-list"><?php _e( 'View entire list of files which will be deleted' ); ?></button> 200 </p> 201 <ul id="files-list" class="code hidden"> 202 <?php 203 foreach ( (array) $files_to_delete as $file ) { 204 echo '<li>' . esc_html( str_replace( WP_CONTENT_DIR . '/themes', '', $file ) ) . '</li>'; 205 } 206 ?> 207 </ul> 208 208 </div> 209 209 <?php 210 210 require_once(ABSPATH . 'wp-admin/admin-footer.php'); -
src/wp-admin/plugins.php
354 354 <?php submit_button( __( 'No, return me to the plugin list' ), 'button', 'submit', false ); ?> 355 355 </form> 356 356 357 <p> <a href="#" onclick="jQuery('#files-list').toggle(); return false;"><?php _e('Click to view entire list of files which will be deleted'); ?></a></p>358 <div id="files-list" style="display:none;">359 <ul class="code">360 <?php361 foreach ( (array) $files_to_delete as $file ) {362 echo '<li>' . esc_html( str_replace( WP_PLUGIN_DIR, '', $file ) ) . '</li>';363 }364 ?>365 </ul>366 </ div>357 <p> 358 <button type="button" class="button-link button-toggle-aria-expanded" aria-expanded="false" aria-owns="files-list"><?php _e( 'View entire list of files which will be deleted' ); ?></button> 359 </p> 360 <ul id="files-list" class="code hidden"> 361 <?php 362 foreach ( (array) $files_to_delete as $file ) { 363 echo '<li>' . esc_html( str_replace( WP_PLUGIN_DIR, '', $file ) ) . '</li>'; 364 } 365 ?> 366 </ul> 367 367 </div> 368 368 <?php 369 369 require_once(ABSPATH . 'wp-admin/admin-footer.php');