Skip to content

Commit fe127ba

Browse files
authored
Merge pull request #1695 from equalizedigital/release/1.41.0
[Backport] Release v1.41.0
2 parents b0f10c1 + ae3aee8 commit fe127ba

12 files changed

Lines changed: 400 additions & 128 deletions

File tree

accessibility-checker.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* Plugin Name: Accessibility Checker
1111
* Plugin URI: https://a11ychecker.com
1212
* Description: Audit and check your website for accessibility before you hit publish. In-post accessibility scanner and guidance.
13-
* Version: 1.40.0
13+
* Version: 1.41.0
1414
* Requires PHP: 7.4
1515
* Author: Equalize Digital
1616
* Author URI: https://equalizedigital.com
@@ -36,7 +36,7 @@
3636

3737
// Current plugin version.
3838
if ( ! defined( 'EDAC_VERSION' ) ) {
39-
define( 'EDAC_VERSION', '1.40.0' );
39+
define( 'EDAC_VERSION', '1.41.0' );
4040
}
4141

4242
// Current database version.

admin/class-admin-notices.php

Lines changed: 105 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ public function init_hooks() {
3535
add_action( 'in_admin_header', [ $this, 'hook_notices' ], 1001 );
3636
// Ajax handlers for notices.
3737
add_action( 'wp_ajax_edac_black_friday_notice_ajax', [ $this, 'edac_black_friday_notice_ajax' ] );
38-
add_action( 'wp_ajax_edac_gaad_notice_ajax', [ $this, 'edac_gaad_notice_ajax' ] );
38+
add_action( 'wp_ajax_edac_gaad_presale_notice_ajax', [ $this, 'edac_gaad_presale_notice_ajax' ] );
39+
add_action( 'wp_ajax_edac_gaad_sale_notice_ajax', [ $this, 'edac_gaad_sale_notice_ajax' ] );
3940
add_action( 'wp_ajax_edac_review_notice_ajax', [ $this, 'edac_review_notice_ajax' ] );
4041
// Save fixes transient on save.
4142
add_action( 'updated_option', [ $this, 'set_fixes_transient_on_save' ] );
@@ -54,7 +55,8 @@ public function hook_notices() {
5455
}
5556

5657
add_action( 'admin_notices', [ $this, 'edac_black_friday_notice' ] );
57-
add_action( 'admin_notices', [ $this, 'edac_gaad_notice' ] );
58+
add_action( 'admin_notices', [ $this, 'edac_gaad_presale_notice' ] );
59+
add_action( 'admin_notices', [ $this, 'edac_gaad_sale_notice' ] );
5860
add_action( 'admin_notices', [ $this, 'edac_review_notice' ] );
5961
}
6062

@@ -179,70 +181,126 @@ public function edac_black_friday_notice_ajax() {
179181
}
180182

181183
/**
182-
* GAAD Notice
184+
* GAAD Pre-Sale Notice
185+
*
186+
* Displays May 13–19 to build awareness of Global Accessibility Awareness Day
187+
* and tease the upcoming flash sale.
183188
*
184189
* @return void
185190
*/
186-
public function edac_gaad_notice() {
187-
188-
// Define constants for start and end dates.
189-
// The banner appears on May 13 (one week early) to build anticipation; the actual sale runs May 20-22.
190-
define( 'EDAC_GAAD_NOTICE_START_DATE', '2026-05-13' );
191-
define( 'EDAC_GAAD_NOTICE_END_DATE', '2026-05-22' );
192-
193-
// Get the value of the 'edac_gaad_notice_dismiss' option and sanitize it.
194-
$dismissed = absint( get_option( 'edac_gaad_notice_dismiss_2026', 0 ) );
191+
public function edac_gaad_presale_notice() {
195192

196193
// Check if the notice has been dismissed.
197-
if ( $dismissed ) {
194+
if ( absint( get_option( 'edac_gaad_presale_notice_dismiss_2026', 0 ) ) ) {
198195
return;
199196
}
200197

201-
// Get the current date in the 'Y-m-d' format.
202198
$current_date = gmdate( 'Y-m-d' );
199+
$start_date = '2026-05-13';
200+
$end_date = '2026-05-19';
203201

204-
// Check if the current date is within the specified range.
205-
if ( $current_date >= EDAC_GAAD_NOTICE_START_DATE && $current_date <= EDAC_GAAD_NOTICE_END_DATE ) {
202+
if ( $current_date >= $start_date && $current_date <= $end_date ) {
203+
echo wp_kses_post( $this->edac_get_gaad_presale_message() );
204+
}
205+
}
206206

207-
// Get the promotional message from a separate function/file.
208-
$message = $this->edac_get_gaad_promo_message();
207+
/**
208+
* Get GAAD Pre-Sale Message
209+
*
210+
* Awareness-focused copy shown May 13–19 before the sale goes live.
211+
*
212+
* @return string
213+
*/
214+
public function edac_get_gaad_presale_message() {
209215

210-
// Output the message with appropriate sanitization.
211-
echo wp_kses_post( $message );
216+
$message = '<div class="edac_gaad_presale_notice notice notice-info is-dismissible">';
217+
$message .= '<p><strong>' . esc_html__( '⚡️ Global Accessibility Awareness Day Flash Sale', 'accessibility-checker' ) . '</strong><br />';
212218

219+
if ( defined( 'EDACP_VERSION' ) && edac_is_pro() ) {
220+
$message .= esc_html__( 'Starting May 20th: Save 15% on accessibility courses and ArchiveWP with coupon code ', 'accessibility-checker' ) . '<code>GAAD2026</code>.<br />';
221+
$message .= esc_html__( '3 days only • May 20–22', 'accessibility-checker' ) . '</p><p>';
222+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/archivewp/', 'admin-notice', 'GAAD2026-archivewp-pre', false ) ) . '">' . esc_html__( 'View ArchiveWP Pricing', 'accessibility-checker' ) . '</a> ';
223+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/learn/courses/', 'admin-notice', 'GAAD2026-courses-pre', false ) ) . '">' . esc_html__( 'View Course Pricing', 'accessibility-checker' ) . '</a></p>';
224+
} else {
225+
$message .= esc_html__( 'Starting May 20th: Save 15% on Accessibility Checker Pro with coupon code ', 'accessibility-checker' ) . '<code>GAAD2026</code>.<br />';
226+
$message .= esc_html__( '3 days only • May 20–22', 'accessibility-checker' ) . '</p><p>';
227+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'admin-notice', 'GAAD2026-pricing-pre', false ) ) . '">' . esc_html__( 'View Pricing', 'accessibility-checker' ) . '</a></p>';
213228
}
229+
230+
$message .= '</div>';
231+
232+
return $message;
214233
}
215234

216235
/**
217-
* Get GAAD Promo Message
236+
* GAAD Pre-Sale Notice Ajax
218237
*
219-
* @return string
238+
* @return void
239+
*
240+
* - '-1' means that nonce could not be verified
241+
* - '-2' means that update option wasn't successful
220242
*/
221-
public function edac_get_gaad_promo_message() {
243+
public function edac_gaad_presale_notice_ajax() {
222244

223-
// Construct the promotional message.
224-
$message = '<div class="edac_gaad_notice notice notice-info is-dismissible">';
245+
if ( ! isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( sanitize_key( $_REQUEST['nonce'] ), 'ajax-nonce' ) ) {
246+
$error = new \WP_Error( '-1', __( 'Permission Denied', 'accessibility-checker' ) );
247+
wp_send_json_error( $error );
248+
}
249+
250+
$results = update_option( 'edac_gaad_presale_notice_dismiss_2026', true );
251+
252+
if ( ! $results ) {
253+
$error = new \WP_Error( '-2', __( 'Update option wasn\'t successful', 'accessibility-checker' ) );
254+
wp_send_json_error( $error );
255+
}
225256

257+
wp_send_json_success( wp_json_encode( $results ) );
258+
}
259+
260+
/**
261+
* GAAD Sale Notice
262+
*
263+
* Displays May 20–22 during the active flash sale.
264+
*
265+
* @return void
266+
*/
267+
public function edac_gaad_sale_notice() {
268+
269+
// Check if the notice has been dismissed.
270+
if ( absint( get_option( 'edac_gaad_sale_notice_dismiss_2026', 0 ) ) ) {
271+
return;
272+
}
273+
274+
$current_date = gmdate( 'Y-m-d' );
275+
$start_date = '2026-05-20';
276+
$end_date = '2026-05-22';
277+
278+
if ( $current_date >= $start_date && $current_date <= $end_date ) {
279+
echo wp_kses_post( $this->edac_get_gaad_sale_message() );
280+
}
281+
}
282+
283+
/**
284+
* Get GAAD Sale Message
285+
*
286+
* Urgency-focused copy shown May 20–22 while the sale is live.
287+
*
288+
* @return string
289+
*/
290+
public function edac_get_gaad_sale_message() {
291+
292+
$message = '<div class="edac_gaad_sale_notice notice notice-info is-dismissible">';
226293
$message .= '<p><strong>' . esc_html__( '⚡️ Global Accessibility Awareness Day Flash Sale', 'accessibility-checker' ) . '</strong><br />';
227294

228295
if ( defined( 'EDACP_VERSION' ) && edac_is_pro() ) {
229-
// Message for users who already have Accessibility Checker Pro active (valid license).
230-
$message .= sprintf(
231-
/* translators: 1: opening anchor tag for accessibility courses link, 2: closing anchor tag, 3: opening anchor tag for ArchiveWP link, 4: closing anchor tag */
232-
esc_html__( '3 days only: Save 15%% on %1$saccessibility courses%2$s and Equalize Digital\'s %3$sArchiveWP plugin%4$s. Go further with accessibility.', 'accessibility-checker' ),
233-
'<a href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/learn/courses/', 'admin-notice', 'GAAD2026-courses', false ) ) . '">',
234-
'</a>',
235-
'<a href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/archivewp/', 'admin-notice', 'GAAD2026-archivewp', false ) ) . '">',
236-
'</a>'
237-
) . '<br />';
238-
$message .= esc_html__( 'Limited-time offer • May 20–22 • Use coupon code ', 'accessibility-checker' ) . '<code>GAAD2026</code><br />';
239-
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/', 'admin-notice', 'GAAD2026-grab-deal', false ) ) . '">' . esc_html__( 'Grab the Deal Before It Ends', 'accessibility-checker' ) . '</a></p>';
296+
$message .= esc_html__( 'Save 15% on accessibility courses and ArchiveWP with coupon code ', 'accessibility-checker' ) . '<code>GAAD2026</code>.<br />';
297+
$message .= esc_html__( 'Limited-time offer • Ends May 22nd', 'accessibility-checker' ) . '</p><p>';
298+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/archivewp/?discount=GAAD2026&pro=true', 'admin-notice', 'GAAD2026-archivewp', false ) ) . '">' . esc_html__( 'View ArchiveWP Pricing', 'accessibility-checker' ) . '</a> ';
299+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/learn/courses/?discount=GAAD2026&pro=true', 'admin-notice', 'GAAD2026-courses', false ) ) . '">' . esc_html__( 'View Course Pricing', 'accessibility-checker' ) . '</a></p>';
240300
} else {
241-
// Message for users who do not have Accessibility Checker Pro active.
242-
$message .= esc_html__( '3 days only: Save 15% when you upgrade to Accessibility Checker Pro with coupon code', 'accessibility-checker' );
243-
$message .= '<code>GAAD2026</code>.</br>';
244-
$message .= esc_html__( 'Limited-time offer • May 20–22', 'accessibility-checker' ) . '<br />';
245-
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'admin-notice', 'GAAD2026-pricing', false ) ) . '">' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '</a></p>';
301+
$message .= esc_html__( '3 days only: Save 15% when you upgrade to Accessibility Checker Pro with coupon code ', 'accessibility-checker' ) . '<code>GAAD2026</code>.<br />';
302+
$message .= esc_html__( 'Limited-time offer • Ends May 22nd', 'accessibility-checker' ) . '</p><p>';
303+
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/?discount=GAAD2026', 'admin-notice', 'GAAD2026-pricing', false ) ) . '">' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '</a></p>';
246304
}
247305

248306
$message .= '</div>';
@@ -251,31 +309,28 @@ public function edac_get_gaad_promo_message() {
251309
}
252310

253311
/**
254-
* GAAD Admin Notice Ajax
312+
* GAAD Sale Notice Ajax
255313
*
256314
* @return void
257315
*
258-
* - '-1' means that nonce could not be varified
316+
* - '-1' means that nonce could not be verified
259317
* - '-2' means that update option wasn't successful
260318
*/
261-
public function edac_gaad_notice_ajax() {
319+
public function edac_gaad_sale_notice_ajax() {
262320

263-
// nonce security.
264321
if ( ! isset( $_REQUEST['nonce'] ) || ! wp_verify_nonce( sanitize_key( $_REQUEST['nonce'] ), 'ajax-nonce' ) ) {
265-
266322
$error = new \WP_Error( '-1', __( 'Permission Denied', 'accessibility-checker' ) );
267323
wp_send_json_error( $error );
268-
269324
}
270325

271-
$results = update_option( 'edac_gaad_notice_dismiss_2026', true );
272-
// Delete old meta keys if they exist.
326+
$results = update_option( 'edac_gaad_sale_notice_dismiss_2026', true );
327+
// Delete old option keys if they exist.
328+
delete_option( 'edac_gaad_notice_dismiss_2026' );
273329
delete_option( 'edac_gaad_notice_dismiss_2025' );
274330
delete_option( 'edac_gaad_notice_dismiss_2024' );
275331
delete_option( 'edac_gaad_notice_dismiss' );
276332

277333
if ( ! $results ) {
278-
279334
$error = new \WP_Error( '-2', __( 'Update option wasn\'t successful', 'accessibility-checker' ) );
280335
wp_send_json_error( $error );
281336

changelog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
*** Accessibility Checker ***
22

3+
2026-05-13 - version 1.41.0
4+
* Updated - the possible heading rule now accounts for elements with role="heading" appropriately.
5+
* Fix - several language translations are now properly detected by WordPress when using them.
6+
* Fix - harden the frontend highlighter scanner against caching when updated.
7+
* Fix - email report checks now defer to the pro plugin when installed to avoid conflicts.
8+
* Fix - Text size too small check no longer produces false positives on screen-reader-only (visually hidden) elements.
9+
310
2026-04-21 - version 1.40.0
411
* New - Screen reader only text format support in the Block Editor and frontend.
512
* New - Email reports opt-in added for site summaries.

includes/classes/class-enqueue-frontend.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public static function maybe_enqueue_frontend_highlighter() {
161161
'appCssUrl' => EDAC_PLUGIN_URL . 'build/css/frontendHighlighterApp.css?ver=' . EDAC_VERSION,
162162
'widgetPosition' => get_option( 'edac_frontend_highlighter_position', 'right' ),
163163
'editorLink' => get_edit_post_link( $post_id ),
164-
'scannerBundleUrl' => esc_url_raw( add_query_arg( 'ver', EDAC_VERSION, plugin_dir_url( __FILE__ ) . 'build/pageScanner.bundle.js' ) ),
164+
'scannerBundleUrl' => esc_url_raw( add_query_arg( 'ver', EDAC_VERSION, plugin_dir_url( EDAC_PLUGIN_FILE ) . 'build/pageScanner.bundle.js' ) ),
165165
'adminThemeColor' => self::get_admin_theme_color(),
166166
]
167167
);

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "accessibility-checker",
3-
"version": "1.40.0",
3+
"version": "1.41.0",
44
"description": "Audit and check your website for accessibility before you hit publish. In-post accessibility scanner and guidance.",
55
"author": "Equalize Digital",
66
"license": "GPL-2.0+",

readme.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: equalizedigital, alh0319, stevejonesdev
33
Tags: accessibility, EAA, WCAG, ADA, WP accessibility, accessibility scanner
44
Requires at least: 6.7
5-
Tested up to: 6.9
6-
Stable tag: 1.40.0
5+
Tested up to: 7.0
6+
Stable tag: 1.41.0
77
Requires PHP: 7.4
88
License: GPL-2.0-or-later
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -279,6 +279,13 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro
279279

280280
== Changelog ==
281281

282+
2026-05-13 - version 1.41.0
283+
* Updated - the possible heading rule now accounts for elements with role="heading" appropriately.
284+
* Fix - several language translations are now properly detected by WordPress when using them.
285+
* Fix - harden the frontend highlighter scanner against caching when updated.
286+
* Fix - email report checks now defer to the pro plugin when installed to avoid conflicts.
287+
* Fix - Text size too small check no longer produces false positives on screen-reader-only (visually hidden) elements.
288+
282289
2026-04-21 - version 1.40.0
283290
* New - Screen reader only text format support in the Block Editor and frontend.
284291
* New - Email reports opt-in added for site summaries.

src/admin/index.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -556,11 +556,20 @@ const edacScriptVars = edac_script_vars;
556556
}
557557

558558
/**
559-
* GAAD Notice Ajax
559+
* GAAD Pre-Sale Notice Ajax
560560
*/
561-
if ( jQuery( '.edac_gaad_notice' ).length ) {
562-
jQuery( '.edac_gaad_notice .notice-dismiss' ).on( 'click', function() {
563-
edacGaadNoticeAjax( 'edac_gaad_notice_ajax' );
561+
if ( jQuery( '.edac_gaad_presale_notice' ).length ) {
562+
jQuery( '.edac_gaad_presale_notice .notice-dismiss' ).on( 'click', function() {
563+
edacNoticeAjax( 'edac_gaad_presale_notice_ajax' );
564+
} );
565+
}
566+
567+
/**
568+
* GAAD Sale Notice Ajax
569+
*/
570+
if ( jQuery( '.edac_gaad_sale_notice' ).length ) {
571+
jQuery( '.edac_gaad_sale_notice .notice-dismiss' ).on( 'click', function() {
572+
edacNoticeAjax( 'edac_gaad_sale_notice_ajax' );
564573
} );
565574
}
566575

@@ -571,12 +580,12 @@ const edacScriptVars = edac_script_vars;
571580
jQuery( '.edac_black_friday_notice .notice-dismiss' ).on(
572581
'click',
573582
function() {
574-
edacGaadNoticeAjax( 'edac_black_friday_notice_ajax' );
583+
edacNoticeAjax( 'edac_black_friday_notice_ajax' );
575584
}
576585
);
577586
}
578587

579-
function edacGaadNoticeAjax( functionName = null ) {
588+
function edacNoticeAjax( functionName = null ) {
580589
jQuery.ajax( {
581590
url: ajaxurl,
582591
method: 'GET',

src/pageScanner/checks/text-size-too-small.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* @return {boolean} True if the text size is equal to or below the minimum size. False otherwise.
66
*/
77

8-
import { fontSizeInPx } from '../helpers/helpers';
8+
import { fontSizeInPx, isScreenReaderOnly } from '../helpers/helpers';
99

1010
const SMALL_FONT_SIZE_THRESHOLD = 10;
1111

@@ -22,7 +22,21 @@ export default {
2222
// handles both leaf nodes and container elements with mixed content.
2323
const hasTextChild = Array.from( node.childNodes ).some( ( child ) => child.nodeType === Node.TEXT_NODE );
2424
if ( ! node.childNodes.length || hasTextChild ) {
25-
return fontSizeInPx( node ) <= SMALL_FONT_SIZE_THRESHOLD;
25+
// Screen-reader-only elements are visually hidden intentionally — font size
26+
// is irrelevant for text that sighted users never see.
27+
if ( isScreenReaderOnly( node ) ) {
28+
return false;
29+
}
30+
31+
const fontSize = fontSizeInPx( node );
32+
33+
// font-size: 0 means the text isn't rendering at all (commonly used as a
34+
// layout technique on icon widget containers). That's not "too small to read".
35+
if ( fontSize === 0 ) {
36+
return false;
37+
}
38+
39+
return fontSize <= SMALL_FONT_SIZE_THRESHOLD;
2640
}
2741

2842
// No text nodes were found in direct children, and this is not a leaf node,

0 commit comments

Comments
 (0)