Skip to content

Commit c79f9c0

Browse files
authored
Merge pull request #1671 from equalizedigital/release/1.40.0
[Backport] Release v1.40.0
2 parents 563a659 + c28acc1 commit c79f9c0

21 files changed

Lines changed: 438 additions & 128 deletions

.coderabbit.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
reviews:
2+
branches:
3+
include:
4+
- main
5+
- develop
6+
- release/**

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-alpha
13+
* Version: 1.40.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-alpha' );
39+
define( 'EDAC_VERSION', '1.40.0' );
4040
}
4141

4242
// Current database version.

admin/AdminPage/AccessibilityReportsPage.php

Lines changed: 57 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -84,22 +84,23 @@ public function render_page() {
8484
$is_pro = $license_context['is_pro'];
8585
$license_key = (string) get_option( 'edacp_license_key', '' );
8686
$is_connected = $license_context['is_connected'];
87-
$next_collection = $this->get_next_collection_date();
87+
$next_send_date = $this->get_next_send_estimate_date();
8888
$scans_stats = new Scans_Stats();
8989
$summary = $scans_stats->summary();
9090
$preview_data = is_array( $summary ) ? $this->get_preview_data( $summary, $is_pro ) : [];
9191

92-
$upgrade_url = edac_generate_link_type(
92+
$upgrade_url = edac_generate_link_type(
9393
[
9494
'utm_campaign' => 'settings-page',
9595
'utm_content' => 'accessibility-reports-upgrade',
9696
]
9797
);
98-
$dashboard_url = edac_link_wrapper( 'https://my.equalizedigital.com/', 'accessibility-reports', 'account', false );
99-
$email_reports_url = edac_link_wrapper( 'https://my.equalizedigital.com/email-reports', 'accessibility-reports', 'email-reports', false );
100-
$signup_url = edac_link_wrapper( 'https://my.equalizedigital.com/sign-up/', 'accessibility-reports', 'signup', false );
101-
$terms_url = edac_link_wrapper( 'https://equalizedigital.com/terms-of-service/', 'accessibility-reports', 'terms', false );
102-
$privacy_url = edac_link_wrapper( 'https://equalizedigital.com/privacy-policy/', 'accessibility-reports', 'privacy', false );
98+
99+
$dashboard_url = edac_link_wrapper( 'https://my.equalizedigital.com/', 'accessibility-reports', 'account', false );
100+
$signup_url = edac_link_wrapper( 'https://my.equalizedigital.com/sign-up/', 'accessibility-reports', 'signup', false );
101+
$privacy_url = edac_link_wrapper( 'https://equalizedigital.com/privacy-policy/', 'accessibility-reports', 'privacy', false );
102+
$data_processing_url = edac_link_wrapper( 'https://equalizedigital.com/data-terms/', 'accessibility-reports', 'dpa', false );
103+
103104
$allowed_icon_html = [
104105
'span' => [
105106
'class' => true,
@@ -159,7 +160,7 @@ public function render_page() {
159160
</div>
160161
<?php else : ?>
161162
<div class="edac-reports-grid edac-reports-grid--two">
162-
<article class="edac-reports-card">
163+
<div class="edac-reports-card">
163164
<h3><?php esc_html_e( 'Free License Key', 'accessibility-checker' ); ?></h3>
164165
<form method="post" action="<?php echo esc_url( admin_url( 'admin-post.php' ) ); ?>">
165166
<input type="hidden" name="action" value="edac_license" />
@@ -170,9 +171,9 @@ public function render_page() {
170171
<?php esc_html_e( 'Enable Email Reports', 'accessibility-checker' ); ?>
171172
</button>
172173
</form>
173-
</article>
174+
</div>
174175

175-
<article class="edac-reports-card">
176+
<div class="edac-reports-card">
176177
<h3><?php esc_html_e( 'Get a Free License Key', 'accessibility-checker' ); ?></h3>
177178
<p>
178179
<?php
@@ -201,29 +202,26 @@ public function render_page() {
201202
);
202203
?>
203204
</p>
204-
</article>
205+
</div>
205206
</div>
206207
<?php endif; ?>
207208
<?php else : ?>
208209
<div class="edac-reports-grid edac-reports-grid--two">
209-
<article class="edac-reports-card">
210+
<div class="edac-reports-card">
210211
<div class="edac-reports-card__header">
211212
<h3><?php esc_html_e( 'Reports Enabled', 'accessibility-checker' ); ?></h3>
212213
<span class="edac-reports-card__status edac-reports-card__status--success" aria-hidden="true"><?php echo wp_kses( $this->get_status_icon( 'check' ), $allowed_icon_html ); ?></span>
213214
</div>
214215
<p><?php esc_html_e( 'You’ll receive weekly accessibility reports for this site.', 'accessibility-checker' ); ?></p>
215216
<p class="edac-reports-card__meta">
216-
<?php if ( $next_collection ) : ?>
217+
<?php if ( $next_send_date ) : ?>
217218
<?php /* translators: %s: next report date. */ ?>
218-
<span><?php printf( esc_html__( 'Next report: %s', 'accessibility-checker' ), esc_html( wp_date( get_option( 'date_format' ), strtotime( $next_collection ) ) ) ); ?></span>
219+
<span><?php printf( esc_html__( 'Next report: %s', 'accessibility-checker' ), esc_html( mysql2date( get_option( 'date_format' ), $next_send_date ) ) ); ?></span>
219220
<?php endif; ?>
220221
</p>
221-
<p>
222-
<a class="button button-primary edac-reports-page__button" href="<?php echo esc_url( $email_reports_url ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Manage Recipients in Dashboard', 'accessibility-checker' ); ?></a>
223-
</p>
224-
</article>
222+
</div>
225223

226-
<article class="edac-reports-card">
224+
<div class="edac-reports-card">
227225
<div class="edac-reports-card__header">
228226
<h3><?php echo esc_html( $is_pro ? __( 'Full Coverage', 'accessibility-checker' ) : __( 'Limited Coverage', 'accessibility-checker' ) ); ?></h3>
229227
<span class="edac-reports-card__status <?php echo esc_attr( $is_pro ? 'edac-reports-card__status--success' : 'edac-reports-card__status--warning' ); ?>" aria-hidden="true"><?php echo wp_kses( $this->get_status_icon( $is_pro ? 'check' : 'warning' ), $allowed_icon_html ); ?></span>
@@ -247,18 +245,18 @@ public function render_page() {
247245
<a class="button button-primary edac-reports-page__button" href="<?php echo esc_url( $upgrade_url ); ?>" target="_blank" rel="noopener noreferrer"><?php esc_html_e( 'Upgrade to Pro', 'accessibility-checker' ); ?></a>
248246
</p>
249247
<?php endif; ?>
250-
</article>
248+
</div>
251249

252-
<article class="edac-reports-card">
250+
<div class="edac-reports-card">
253251
<h3><?php esc_html_e( 'Accessibility Summary', 'accessibility-checker' ); ?></h3>
254252
<p><?php esc_html_e( 'This summary reflects the latest scan data available for your site.', 'accessibility-checker' ); ?></p>
255253
<div class="edac-reports-stat">
256254
<div class="edac-reports-stat__label"><?php esc_html_e( 'Total Issues Found', 'accessibility-checker' ); ?></div>
257255
<div class="edac-reports-stat__value"><?php echo esc_html( number_format_i18n( $preview_data['total_issues'] ) ); ?></div>
258256
</div>
259-
</article>
257+
</div>
260258

261-
<article class="edac-reports-card">
259+
<div class="edac-reports-card">
262260
<h3><?php echo esc_html( $is_pro ? __( 'Account Connection', 'accessibility-checker' ) : __( 'Free License Key', 'accessibility-checker' ) ); ?></h3>
263261
<?php if ( ! $is_pro ) : ?>
264262
<div class="edac-reports-page__license-mask"><?php echo esc_html( $this->mask_license_key( $license_key ) ); ?></div>
@@ -270,17 +268,19 @@ public function render_page() {
270268
<?php esc_html_e( 'Disable Email Reports', 'accessibility-checker' ); ?>
271269
</button>
272270
</form>
273-
</article>
271+
</div>
274272
</div>
275273
<?php endif; ?>
276274

277275
<p class="edac-reports-page__legal">
278276
<?php
279277
printf(
280-
/* translators: %1$s: terms link, %2$s: privacy link. */
281-
wp_kses_post( __( 'By connecting this site, you agree to the Equalize Digital <a href="%1$s" target="_blank" rel="noopener noreferrer">Terms of Service</a> and <a href="%2$s" target="_blank" rel="noopener noreferrer">Privacy Policy</a>.', 'accessibility-checker' ) ),
282-
esc_url( $terms_url ),
283-
esc_url( $privacy_url )
278+
/* translators: %1$s: privacy link, %2$s: data processing agreement link, %3$s: privacy policy aria label, %4$s: data processing agreement aria label. */
279+
wp_kses_post( __( 'By connecting this site, you agree to Equalize Digital\'s <a href="%1$s" target="_blank" rel="noopener noreferrer" aria-label="%3$s">Privacy Policy <span aria-hidden="true">&#8599;</span></a> and <a href="%2$s" target="_blank" rel="noopener noreferrer" aria-label="%4$s">Data Processing Agreement <span aria-hidden="true">&#8599;</span></a>.', 'accessibility-checker' ) ),
280+
esc_url( $privacy_url ),
281+
esc_url( $data_processing_url ),
282+
esc_attr__( 'Privacy Policy (opens in a new window)', 'accessibility-checker' ),
283+
esc_attr__( 'Data Processing Agreement (opens in a new window)', 'accessibility-checker' )
284284
);
285285
?>
286286
</p>
@@ -290,8 +290,8 @@ public function render_page() {
290290
<aside class="edac-reports-preview">
291291
<img
292292
class="edac-reports-preview__image"
293-
src="<?php echo esc_url( EDAC_PLUGIN_URL . 'assets/images/accessibility-reports-email-preview.png' ); ?>"
294-
alt="<?php esc_attr_e( 'Preview of the weekly accessibility report email.', 'accessibility-checker' ); ?>"
293+
src="<?php echo esc_url( EDAC_PLUGIN_URL . 'assets/images/accessibility-reports-email-preview.jpg' ); ?>"
294+
alt="<?php esc_attr_e( 'Weekly email includes total issues found and changes since the last report, coverage information, counts of problems, needs review, passed test percentage, and information about the most problematic pages and the most severe issues.', 'accessibility-checker' ); ?>"
295295
/>
296296
</aside>
297297
</div>
@@ -319,42 +319,48 @@ private function get_license_context(): array {
319319
/**
320320
* Resolve effective license context from current status values.
321321
*
322-
* @param bool $has_pro_plugin Whether the Pro plugin is installed.
323-
* @param string $pro_status Current Pro license status.
324-
* @param string $free_status Current free license status.
325-
* @param string $site_id Current connected site ID.
322+
* @param bool $has_pro_plugin Whether the Pro plugin is installed.
323+
* @param string $pro_status Current Pro license status.
324+
* @param string $free_status Current free license status.
325+
* @param string $site_id Current connected site ID.
326+
* @param bool $fallback_active Whether a fallback from Pro to Free is currently active.
326327
* @return array{has_pro_plugin:bool,is_pro:bool,status:string,is_connected:bool}
327328
*/
328-
private static function resolve_license_context( bool $has_pro_plugin, string $pro_status, string $free_status, string $site_id ): array {
329-
$is_pro = $has_pro_plugin && 'valid' === $pro_status;
329+
private static function resolve_license_context( bool $has_pro_plugin, string $pro_status, string $free_status, string $site_id, bool $fallback_active = false ): array {
330+
$is_pro = $has_pro_plugin && 'valid' === $pro_status && ! $fallback_active;
330331
$status = $is_pro ? $pro_status : $free_status;
331332
$is_connected = 'valid' === $status && '' !== $site_id;
332333

333334

334335
return [
335-
'has_pro_plugin' => $has_pro_plugin,
336-
'is_pro' => $is_pro,
337-
'status' => $status,
338-
'is_connected' => $is_connected,
336+
'has_pro_plugin' => $has_pro_plugin,
337+
'is_pro' => $is_pro,
338+
'status' => $status,
339+
'is_connected' => $is_connected,
340+
'fallback_active' => $fallback_active,
339341
];
340342
}
341343

342344
/**
343-
* Get the next report collection date for display.
344-
*
345-
* Prefers the schedule returned by the connector service and falls back to a
346-
* local estimate when no remote schedule has been stored yet.
345+
* Gets the next estimated send date, assuming each send will be on
346+
* Mondays.
347347
*
348348
* @return string
349349
*/
350-
private function get_next_collection_date(): string {
351-
$next_collection = (string) get_option( 'edac_next_collection', '' );
352-
if ( '' !== $next_collection ) {
353-
return $next_collection;
354-
}
350+
private function get_next_send_estimate_date(): string {
351+
try {
352+
// If today is Monday, use today. Otherwise, use next Monday.
353+
$today = new \DateTime( 'now', wp_timezone() );
355354

356-
$next_monday = new \DateTime( 'next monday', wp_timezone() );
357-
return $next_monday->format( 'Y-m-d' );
355+
if ( '1' === $today->format( 'N' ) ) {
356+
return $today->format( 'Y-m-d' );
357+
}
358+
359+
$next_monday = new \DateTime( 'next monday', wp_timezone() );
360+
return $next_monday->format( 'Y-m-d' );
361+
} catch ( \Exception $exception ) {
362+
return '';
363+
}
358364
}
359365

360366
/**

admin/class-admin-notices.php

Lines changed: 30 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -186,16 +186,12 @@ public function edac_black_friday_notice_ajax() {
186186
public function edac_gaad_notice() {
187187

188188
// Define constants for start and end dates.
189-
define( 'EDAC_GAAD_NOTICE_START_DATE', '2025-05-13' );
190-
define( 'EDAC_GAAD_NOTICE_END_DATE', '2025-05-21' );
191-
192-
// Check if Accessibility Checker Pro is active.
193-
if ( defined( 'EDACP_VERSION' ) ) {
194-
return;
195-
}
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' );
196192

197193
// Get the value of the 'edac_gaad_notice_dismiss' option and sanitize it.
198-
$dismissed = absint( get_option( 'edac_gaad_notice_dismiss_2025', 0 ) );
194+
$dismissed = absint( get_option( 'edac_gaad_notice_dismiss_2026', 0 ) );
199195

200196
// Check if the notice has been dismissed.
201197
if ( $dismissed ) {
@@ -225,11 +221,30 @@ public function edac_gaad_notice() {
225221
public function edac_get_gaad_promo_message() {
226222

227223
// Construct the promotional message.
228-
$message = '<div class="edac_gaad_notice notice notice-info is-dismissible">';
229-
$message .= '<p><strong>' . esc_html__( '🎉 Get 25% off Accessibility Checker Pro in honor of Global Accessibility Awareness Day! 🎉', 'accessibility-checker' ) . '</strong><br />';
230-
$message .= esc_html__( 'Use coupon code GAAD25 from May 13th-May 21st to get access to full-site scanning and other pro features at a special discount. Not sure if upgrading is right for you?', 'accessibility-checker' ) . '<br />';
231-
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/contact/', 'admin-notice', 'GAAD25-presale', false ) ) . '">' . esc_html__( 'Ask a Pre-Sale Question', 'accessibility-checker' ) . '</a> ';
232-
$message .= '<a class="button button-primary" href="' . esc_url( edac_link_wrapper( 'https://equalizedigital.com/accessibility-checker/pricing/', 'admin-notice', 'GAAD25-pricing', false ) ) . '">' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '</a></p>';
224+
$message = '<div class="edac_gaad_notice notice notice-info is-dismissible">';
225+
226+
$message .= '<p><strong>' . esc_html__( '⚡️ Global Accessibility Awareness Day Flash Sale', 'accessibility-checker' ) . '</strong><br />';
227+
228+
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>';
240+
} 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>';
246+
}
247+
233248
$message .= '</div>';
234249

235250
return $message;
@@ -253,8 +268,9 @@ public function edac_gaad_notice_ajax() {
253268

254269
}
255270

256-
$results = update_option( 'edac_gaad_notice_dismiss_2025', true );
271+
$results = update_option( 'edac_gaad_notice_dismiss_2026', true );
257272
// Delete old meta keys if they exist.
273+
delete_option( 'edac_gaad_notice_dismiss_2025' );
258274
delete_option( 'edac_gaad_notice_dismiss_2024' );
259275
delete_option( 'edac_gaad_notice_dismiss' );
260276

45.5 KB
Loading
-68.6 KB
Binary file not shown.

changelog.txt

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

3+
2026-04-21 - version 1.40.0
4+
* New - Screen reader only text format support in the Block Editor and frontend.
5+
* New - Email reports opt-in added for site summaries.
6+
* New - Frontend highlighter UI update and positioning options added.
7+
* Fix - Article landmark labels now correctly display "Landmark: Article".
8+
* Changed - Missing Table Header checks now correctly skip tables marked with role="presentation" or role="none".
9+
* Changed - Table header detection now better handles colspan, rowspan, and ARIA header relationships.
10+
* Changed - Orphaned issue cleanup now runs twice daily for fresher issue data.
11+
312
2026-03-17 - version 1.39.0
413
* New - CSS modifier classes to opt out of the New Window Warning icon and tooltip.
514
* New - Setting to hide the legacy metabox in the Block Editor.

includes/classes/MyDot/Connector.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1061,6 +1061,12 @@ public static function validate_jwt_token_in_request_with_fallback( $request ) {
10611061
$parts = null !== $auth_header ? explode( ' ', $auth_header ) : [];
10621062
if ( ! empty( $auth_header ) ) {
10631063
if ( count( $parts ) === 2 && 'Bearer' === $parts[0] ) {
1064+
// Check if the site is registered currently before attempting validation.
1065+
$site_id = (string) get_option( 'edac_site_id', '' );
1066+
if ( '' === $site_id ) {
1067+
return false;
1068+
}
1069+
10641070
// Use the fallback validator which will refresh key if needed.
10651071
return self::validate_jwt_token_with_fallback( $parts[1] );
10661072
}

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.39.0",
3+
"version": "1.40.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+",

0 commit comments

Comments
 (0)