Changeset 59225
- Timestamp:
- 10/13/2024 08:47:12 PM (2 months ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/js/_enqueues/wp/revisions.js
r47120 r59225 596 596 _.bindAll( this, 'setWidth' ); 597 597 598 // Add the checkbox view. 599 this.views.add( new revisions.view.Checkbox({ 600 model: this.model 601 }) ); 602 598 603 // Add the button view. 599 604 this.views.add( new revisions.view.Buttons({ 600 model: this.model601 }) );602 603 // Add the checkbox view.604 this.views.add( new revisions.view.Checkbox({605 605 model: this.model 606 606 }) ); … … 628 628 model: tooltip 629 629 }) ); 630 631 // Add the visually hidden slider help view. 632 this.views.add( new revisions.view.SliderHelp() ); 630 633 631 634 // Add the slider view. … … 805 808 }); 806 809 810 // The slider visually hidden help view. 811 revisions.view.SliderHelp = wp.Backbone.View.extend({ 812 className: 'revisions-slider-hidden-help', 813 template: wp.template( 'revisions-slider-hidden-help' ) 814 }); 815 807 816 // The tooltip view. 808 817 // Encapsulates the tooltip. … … 958 967 }, 959 968 969 accessibilityHelper: function() { 970 var handles = $( '.ui-slider-handle' ); 971 handles.first().attr( { 972 role: 'button', 973 'aria-labelledby': 'diff-title-from diff-title-author', 974 'aria-describedby': 'revisions-slider-hidden-help', 975 } ); 976 handles.last().attr( { 977 role: 'button', 978 'aria-labelledby': 'diff-title-to diff-title-author', 979 'aria-describedby': 'revisions-slider-hidden-help', 980 } ); 981 }, 982 960 983 mouseMove: function( e ) { 961 984 var zoneCount = this.model.revisions.length - 1, // One fewer zone than models. … … 997 1020 .toggleClass( 'from-handle', !! isRtl ) 998 1021 .toggleClass( 'to-handle', ! isRtl ); 1022 this.accessibilityHelper(); 999 1023 } else { 1000 1024 handles.removeClass('from-handle to-handle'); 1001 } 1025 this.accessibilityHelper(); 1026 } 1027 1002 1028 }, 1003 1029 -
trunk/src/wp-admin/css/revisions.css
r57363 r59225 459 459 } 460 460 461 .wp-slider .ui-slider-handle, 462 .wp-slider .ui-slider-handle.focus { 461 .wp-slider .ui-slider-handle { 463 462 background: #f6f7f7; 464 463 border: 1px solid #c3c4c7; … … 478 477 box-shadow: inset 0 2px 5px -3px rgba(0, 0, 0, 0.5); 479 478 transform: translateY(1px); 479 } 480 481 .wp-slider .ui-slider-handle:focus, 482 .wp-slider .ui-slider-handle.ui-state-focus { 483 background: #f0f0f1; 484 border-color: #8c8f94; 485 box-shadow: 0 0 0 2px #2271b1; 486 /* Only visible in Windows High Contrast mode */ 487 outline: 2px solid transparent; 480 488 } 481 489 -
trunk/src/wp-admin/includes/revision.php
r57644 r59225 379 379 </script> 380 380 381 <script id="tmpl-revisions-slider-hidden-help" type="text/html"> 382 <h2 class="screen-reader-text"><?php esc_html_e( 'Select a revision' ); ?></h2> 383 <p id="revisions-slider-hidden-help" hidden><?php esc_html_e( 'Change revision by using the left and arrow keys' ); ?></p> 384 </script> 385 381 386 <script id="tmpl-revisions-checkbox" type="text/html"> 382 387 <div class="revision-toggle-compare-mode"> … … 398 403 <div class="diff-title"> 399 404 <# if ( 'from' === data.type ) { #> 400 <strong ><?php _ex( 'From:', 'Followed by post revision info' ); ?></strong>405 <strong id="diff-title-from"><?php _ex( 'From:', 'Followed by post revision info' ); ?></strong> 401 406 <# } else if ( 'to' === data.type ) { #> 402 <strong ><?php _ex( 'To:', 'Followed by post revision info' ); ?></strong>407 <strong id="diff-title-to"><?php _ex( 'To:', 'Followed by post revision info' ); ?></strong> 403 408 <# } #> 404 409 <div class="author-card<# if ( data.attributes.autosave ) { #> autosave<# } #>"> 405 410 {{{ data.attributes.author.avatar }}} 406 <div class="author-info" >411 <div class="author-info" id="diff-title-author"> 407 412 <# if ( data.attributes.autosave ) { #> 408 413 <span class="byline"> … … 465 470 <div class="diff"> 466 471 <# _.each( data.fields, function( field ) { #> 467 <h 3>{{ field.name }}</h3>472 <h2>{{ field.name }}</h2> 468 473 {{{ field.diff }}} 469 474 <# }); #>
Note: See TracChangeset
for help on using the changeset viewer.