Ticket #33029: 33029.5.patch
| File 33029.5.patch, 3.0 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/css/common.css
164 164 display: none; 165 165 } 166 166 167 .focus-placeholder { 168 /* temporary styling for debugging */ 169 width: 300px; 170 height: 1.4em; 171 position: fixed; 172 top: 7px; 173 left: 50%; 174 z-index: 100000; 175 margin-left: -150px; 176 text-align: center; 177 background: #fafafa; 178 } 179 180 .focus-placeholder:focus { 181 /* temporary styling for debugging */ 182 outline: 2px solid red; 183 } 184 167 185 /* @todo: Take a second look. Large chunks of shared color, from the colors.css merge */ 168 186 .widget-top, 169 187 .menu-item-handle, -
src/wp-admin/js/common.js
408 408 409 409 $button.on( 'click.wp-dismiss-notice', function( event ) { 410 410 event.preventDefault(); 411 wp.a11y.focusPlaceholder( $this, commonL10n.dismissed ); 411 412 $this.fadeTo( 100 , 0, function() { 412 413 $(this).slideUp( 100, function() { 413 414 $(this).remove(); -
src/wp-includes/js/wp-a11y.js
82 82 } 83 83 }); 84 84 85 /** 86 * Focus placeholder to use when focused elements get hidden or removed from the DOM. 87 * 88 * @since 4.4.0 89 * 90 * @param {jQuery} $el The element that is going to be hidden or removed from the DOM. 91 * @param {String} message Optional. A message to be used as the focus placeholder content. 92 * Screen readers will read out the message as soon as the placeholder receives focus. 93 */ 94 function focusPlaceholder( $el, message ) { 95 var focusPlaceHolder; 96 97 if ( ! $el.length ) { 98 return; 99 } 100 101 focusPlaceHolder = $( '<span>', { 102 'tabindex': '0', 103 'class': 'focus-placeholder will-be-screen-reader-text' 104 }); 105 106 if ( message ) { 107 focusPlaceHolder.text( message ); 108 } 109 110 focusPlaceHolder 111 .insertBefore( $el ) 112 .focus() 113 .on( 'blur', function() { 114 $( this ).remove(); 115 }); 116 } 117 85 118 wp.a11y = wp.a11y || {}; 86 119 wp.a11y.speak = speak; 120 wp.a11y.focusPlaceholder = focusPlaceholder; 87 121 88 122 }( window.wp, window.jQuery )); -
src/wp-includes/script-loader.php
81 81 did_action( 'init' ) && $scripts->localize( 'common', 'commonL10n', array( 82 82 'warnDelete' => __( "You are about to permanently delete these items.\n 'Cancel' to stop, 'OK' to delete." ), 83 83 'dismiss' => __( 'Dismiss this notice.' ), 84 'dismissed' => __( 'Notice dismissed.' ), 84 85 ) ); 85 86 86 87 $scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 );
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)