diff --git a/easy-recent-posts.php b/easy-recent-posts.php
index dd847cf..f51eb7f 100644
--- a/easy-recent-posts.php
+++ b/easy-recent-posts.php
@@ -5,7 +5,7 @@
* Description: An easy-to-use WordPress widget and shortcode to add recent posts to any theme.
* Author: Christopher Ross
* Author URI: https://thisismyurl.com/
- * Version: 26.6147
+ * Version: 26.6148.2110
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: easy-recent-posts
@@ -20,7 +20,7 @@
}
define( 'THISISMYURL_EREP_NAME', 'Easy Recent Posts' );
-define( 'THISISMYURL_EREP_VERSION', '26.6147' );
+define( 'THISISMYURL_EREP_VERSION', '26.6148.2110' );
define( 'THISISMYURL_EREP_FILENAME', plugin_basename( __FILE__ ) );
define( 'THISISMYURL_EREP_FILEPATH', plugin_dir_path( __FILE__ ) );
define( 'THISISMYURL_EREP_URL', plugin_dir_url( __FILE__ ) );
@@ -223,16 +223,20 @@ public function easy_recent_posts( $options = null ) {
if ( 1 === (int) $options['include_link'] ) {
$rel = ( 1 === (int) $options['nofollow'] ) ? ' rel="nofollow noopener noreferrer"' : '';
+ // No title attribute: it would duplicate the visible link text and cause
+ // doubled screen-reader announcements (WCAG 2.4.4 / 4.1.2).
$item = sprintf(
- '%s',
+ '%s',
esc_url( get_permalink( $recent_post->ID ) ),
- esc_attr( get_the_title( $recent_post->ID ) ),
$rel,
$item
);
}
if ( 1 === (int) $options['feature_image'] && has_post_thumbnail( $recent_post->ID ) ) {
+ // Alt text is controlled by the attachment's own alt-text field
+ // (Media Library > Alternative Text); WP core emits it here. A post
+ // with a decorative thumbnail should set an empty alt on the attachment.
$item = sprintf(
'
%s
%s',
get_the_post_thumbnail( $recent_post->ID, 'thumbnail' ), // Escaped internally by WP core.
diff --git a/readme.txt b/readme.txt
index 429ce88..34f0547 100644
--- a/readme.txt
+++ b/readme.txt
@@ -5,7 +5,7 @@ Tags: recent posts, recent, sidebar, widget
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
-Stable tag: 26.6147
+Stable tag: 26.6148.2110
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -30,6 +30,10 @@ Features:
== Changelog ==
+= 26.6148 =
+* Accessibility: removed redundant `title` attributes from recent-post links and the widget credit link; they duplicated the visible link text and caused doubled screen-reader announcements (WCAG 2.4.4 / 4.1.2).
+* Documented that featured-image alt text is controlled by the attachment's Alternative Text field.
+
= 26.6147 =
* Unified plugin versioning to the x.Yddd calendar-version scheme.
* Confirmed compatibility with WordPress 7.0.
diff --git a/widgets/class-thisismyurl-easy-recent-posts-widget.php b/widgets/class-thisismyurl-easy-recent-posts-widget.php
index 3069eea..fe2d9e9 100644
--- a/widgets/class-thisismyurl-easy-recent-posts-widget.php
+++ b/widgets/class-thisismyurl-easy-recent-posts-widget.php
@@ -159,10 +159,11 @@ public function widget( $args, $instance ) {
$title = ! empty( $instance['title'] ) ? $instance['title'] : '';
if ( 1 === (int) $instance['show_credit'] && $title ) {
+ // No title attribute: it would duplicate the visible link text and cause
+ // doubled screen-reader announcements (WCAG 2.4.4 / 4.1.2).
$title = sprintf(
- '%s',
+ '%s',
esc_url( 'https://thisismyurl.com/downloads/easy-recent-posts/' ),
- esc_attr__( 'Easy Recent Posts', 'easy-recent-posts' ),
esc_html( $title )
);
} elseif ( $title ) {