wp/wp-admin/includes/revision.php
changeset 22 8c2e4d02f4ef
parent 21 48c4eec2b7e6
--- a/wp/wp-admin/includes/revision.php	Fri Sep 05 18:40:08 2025 +0200
+++ b/wp/wp-admin/includes/revision.php	Fri Sep 05 18:52:52 2025 +0200
@@ -378,6 +378,11 @@
 		</div>
 	</script>
 
+	<script id="tmpl-revisions-slider-hidden-help" type="text/html">
+		<h2 class="screen-reader-text"><?php esc_html_e( 'Select a revision' ); ?></h2>
+		<p id="revisions-slider-hidden-help" hidden><?php esc_html_e( 'Change revision by using the left and right arrow keys' ); ?></p>
+	</script>
+
 	<script id="tmpl-revisions-checkbox" type="text/html">
 		<div class="revision-toggle-compare-mode">
 			<label>
@@ -397,46 +402,48 @@
 		<# if ( ! _.isUndefined( data.attributes ) ) { #>
 			<div class="diff-title">
 				<# if ( 'from' === data.type ) { #>
-					<strong><?php _ex( 'From:', 'Followed by post revision info' ); ?></strong>
+					<strong id="diff-title-from"><?php _ex( 'From:', 'Followed by post revision info' ); ?></strong>
 				<# } else if ( 'to' === data.type ) { #>
-					<strong><?php _ex( 'To:', 'Followed by post revision info' ); ?></strong>
+					<strong id="diff-title-to"><?php _ex( 'To:', 'Followed by post revision info' ); ?></strong>
 				<# } #>
 				<div class="author-card<# if ( data.attributes.autosave ) { #> autosave<# } #>">
-					{{{ data.attributes.author.avatar }}}
-					<div class="author-info">
-					<# if ( data.attributes.autosave ) { #>
-						<span class="byline">
-						<?php
-						printf(
-							/* translators: %s: User's display name. */
-							__( 'Autosave by %s' ),
-							'<span class="author-name">{{ data.attributes.author.name }}</span>'
-						);
-						?>
-							</span>
-					<# } else if ( data.attributes.current ) { #>
-						<span class="byline">
-						<?php
-						printf(
-							/* translators: %s: User's display name. */
-							__( 'Current Revision by %s' ),
-							'<span class="author-name">{{ data.attributes.author.name }}</span>'
-						);
-						?>
-							</span>
-					<# } else { #>
-						<span class="byline">
-						<?php
-						printf(
-							/* translators: %s: User's display name. */
-							__( 'Revision by %s' ),
-							'<span class="author-name">{{ data.attributes.author.name }}</span>'
-						);
-						?>
-							</span>
-					<# } #>
-						<span class="time-ago">{{ data.attributes.timeAgo }}</span>
-						<span class="date">({{ data.attributes.dateShort }})</span>
+					<div>
+						{{{ data.attributes.author.avatar }}}
+						<div class="author-info" id="diff-title-author">
+						<# if ( data.attributes.autosave ) { #>
+							<span class="byline">
+							<?php
+							printf(
+								/* translators: %s: User's display name. */
+								__( 'Autosave by %s' ),
+								'<span class="author-name">{{ data.attributes.author.name }}</span>'
+							);
+							?>
+								</span>
+						<# } else if ( data.attributes.current ) { #>
+							<span class="byline">
+							<?php
+							printf(
+								/* translators: %s: User's display name. */
+								__( 'Current Revision by %s' ),
+								'<span class="author-name">{{ data.attributes.author.name }}</span>'
+							);
+							?>
+								</span>
+						<# } else { #>
+							<span class="byline">
+							<?php
+							printf(
+								/* translators: %s: User's display name. */
+								__( 'Revision by %s' ),
+								'<span class="author-name">{{ data.attributes.author.name }}</span>'
+							);
+							?>
+								</span>
+						<# } #>
+							<span class="time-ago">{{ data.attributes.timeAgo }}</span>
+							<span class="date">({{ data.attributes.dateShort }})</span>
+						</div>
 					</div>
 				<# if ( 'to' === data.type && data.attributes.restoreUrl ) { #>
 					<input  <?php if ( wp_check_post_lock( $post->ID ) ) { ?>
@@ -461,10 +468,10 @@
 
 	<script id="tmpl-revisions-diff" type="text/html">
 		<div class="loading-indicator"><span class="spinner"></span></div>
-		<div class="diff-error"><?php _e( 'Sorry, something went wrong. The requested comparison could not be loaded.' ); ?></div>
+		<div class="diff-error"><?php _e( 'An error occurred while loading the comparison. Please refresh the page and try again.' ); ?></div>
 		<div class="diff">
 		<# _.each( data.fields, function( field ) { #>
-			<h3>{{ field.name }}</h3>
+			<h2>{{ field.name }}</h2>
 			{{{ field.diff }}}
 		<# }); #>
 		</div>