Skip to content

Commit 7443360

Browse files
authored
Merge pull request #811 from equalizedigital/release/1.16.2
Release v1.16.2
2 parents 99e5728 + 3fab5fc commit 7443360

13 files changed

Lines changed: 129 additions & 145 deletions

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.16.1
13+
* Version: 1.16.2
1414
* Author: Equalize Digital
1515
* Author URI: https://equalizedigital.com
1616
* License: GPL-2.0+
@@ -35,7 +35,7 @@
3535

3636
// Current plugin version.
3737
if ( ! defined( 'EDAC_VERSION' ) ) {
38-
define( 'EDAC_VERSION', '1.16.1' );
38+
define( 'EDAC_VERSION', '1.16.2' );
3939
}
4040

4141
// Current database version.

admin/class-admin-notices.php

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -92,23 +92,19 @@ public function edac_remove_admin_notices() {
9292
public function edac_black_friday_notice() {
9393

9494
// check if accessibility checker pro is active.
95-
$pro = is_plugin_active( 'accessibility-checker-pro/accessibility-checker-pro.php' );
96-
if ( $pro ) {
95+
if ( is_plugin_active( 'accessibility-checker-pro/accessibility-checker-pro.php' ) ) {
9796
return;
9897
}
9998

100-
// Get the value of the 'edac_gaad_notice_dismiss' option and sanitize it.
101-
$dismissed = absint( get_option( 'edac_black_friday_2023_notice_dismiss', 0 ) );
102-
10399
// Check if the notice has been dismissed.
104-
if ( $dismissed ) {
100+
if ( absint( get_option( 'edac_black_friday_2024_notice_dismiss', 0 ) ) ) {
105101
return;
106102
}
107103

108-
// Show from November 20-30.
104+
// Show from November 25 to December 03.
109105
$current_date = date_i18n( 'Ymd' ); // Use date_i18n for localization.
110-
$start_date = '20231120';
111-
$end_date = '20231130';
106+
$start_date = '20241125';
107+
$end_date = '20241203';
112108

113109
if ( $current_date >= $start_date && $current_date <= $end_date ) {
114110

@@ -131,7 +127,7 @@ public function edac_get_black_friday_message() {
131127
// Construct the promotional message.
132128
$message = '<div class="edac_black_friday_notice notice notice-info is-dismissible">';
133129
$message .= '<p><strong>' . esc_html__( '🎉 Black Friday special! 🎉', 'accessibility-checker' ) . '</strong><br />';
134-
$message .= esc_html__( 'Upgrade to a paid version of Accessibility Checker from November 20-30 and get 40% off! Full site scanning, site-wide open issues report, ignore logs, and more.', 'accessibility-checker' ) . '<br />';
130+
$message .= esc_html__( 'Upgrade to a paid version of Accessibility Checker from November 25th to December 3rd and get 30% off! Full site scanning, site-wide open issues report, ignore logs, and more.', 'accessibility-checker' ) . '<br />';
135131
$message .= '<a class="button button-primary" href="' . esc_url( 'https://my.equalizedigital.com/support/pre-sale-questions/?utm_source=accessibility-checker&utm_medium=software&utm_campaign=BlackFriday' ) . '">' . esc_html__( 'Ask a Pre-Sale Question', 'accessibility-checker' ) . '</a> ';
136132
$message .= '<a class="button button-primary" href="' . esc_url( 'https://equalizedigital.com/accessibility-checker/pricing/?utm_source=WPadmin&utm_medium=banner&utm_campaign=BlackFriday' ) . '">' . esc_html__( 'Upgrade Now', 'accessibility-checker' ) . '</a></p>';
137133
$message .= '</div>';
@@ -157,7 +153,7 @@ public function edac_black_friday_notice_ajax() {
157153

158154
}
159155

160-
$results = update_option( 'edac_black_friday_2023_notice_dismiss', true );
156+
$results = update_option( 'edac_black_friday_2024_notice_dismiss', true );
161157

162158
if ( ! $results ) {
163159

changelog.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,46 @@
11
Newer versions can be found in readme.txt.
22

3+
= 1.14.3 =
4+
* Fixed: Allow empty_link rule to detect actually empty links
5+
6+
= 1.14.2 =
7+
* Enhancement: Reduce false positives for underlined text check
8+
* Fixed: Frontend highlighter could not be moved to the right side of the window on mobile
9+
* Fixed: Issue where ignores were not being saved and failing silently
10+
11+
= 1.14.1 =
12+
* Fixed: Prevent settings page layout issue
13+
14+
= 1.14.0 =
15+
* Added: Option to move front-end highlighter to opposite side of the window
16+
* Fixed: Prevent image from overspilling container in issue view
17+
* Fixed: Make empty paragraph check more accurate
18+
* Enhancement: Improved styling for settings page
19+
* Enhancement: Updated summary widget with better semantics
20+
* Enhancement: Improved aria labeling for view on page links
21+
* Enhancement: Added large batch processing capabilities for issue ignoring
22+
23+
= 1.13.1 =
24+
* Enhancement: Make the new window warning detection less rigid
25+
* Fixed: Avoid flagging possible headings when the entire text is not wrapped
26+
* Fixed: Allow JS checked rules to retain ignored state between scans
27+
28+
= 1.13.0 =
29+
* Added: Meta Viewport zoom-able and scale-able check
30+
* Added: Empty Paragraph warning
31+
* Fixed: Properly determine possible headings with computed styles
32+
* Improved: Better detection of the underlined text
33+
* Improved: Better detection of small text
34+
* Improved: Better detection of justified text
35+
* Improved: Better detection of blink and marquee tags
36+
* Improved: No longer flagging GTM iframes as missing title since they are display: none and visibility: hidden
37+
* Enhancement: Do not show 'View on page' link to frontend when the issues cannot be viewed
38+
39+
= 1.12.0 =
40+
* Fixed: Use the last generation time in summary widgets rather than last completed scan time
41+
* Improved: More accessible panels in the editor
42+
* Improved: Filter and action docs added/improved
43+
344
= 1.11.2
445
* Fixed: Avoid displaying `0th` for readability score
546
* Removed: Some custom WP Playground detection code

includes/rules.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
TabindexFix,
1010
AddLabelToUnlabelledFormFieldsFix,
1111
CommentSearchLabelFix,
12-
ReadMoreAddTitleFix,
1312
PreventLinksOpeningNewWindowFix,
1413
HTMLLangAndDirFix,
1514
AddMissingOrEmptyPageTitleFix,
@@ -243,13 +242,15 @@
243242
'slug' => 'link_ms_office_file',
244243
'rule_type' => 'warning',
245244
'summary' => esc_html__( 'A Link to MS Office File warning means that one or more of the links on your page or post directs to a file with one of the following file extensions: .doc, .docx, .xls, .xlsx, .ppt, .pptx, .pps or .ppsx. This warning appears when an MS Office file is present as a reminder to manually test your Word documents, PowerPoint presentations, and Excel spreadsheets for accessibility and to confirm that they conform to all relevant WCAG guidelines. To resolve a Link to MS Office File warning, you need to: (1) ensure a direct link to view or download the document is present if you\'re using a plugin to embed it on the page; (2) ensure the link to the document warns users it is a link to a document by displaying the specific file extension in the link anchor; and (3) test and remediate your MS Office file for accessibility errors. After determining your file is fully accessible, you can safely “Ignore” the warning.', 'accessibility-checker' ),
245+
'ruleset' => 'js',
246246
],
247247
[
248248
'title' => esc_html__( 'Link to PDF', 'accessibility-checker' ),
249249
'info_url' => 'https://a11ychecker.com/help1972',
250250
'slug' => 'link_pdf',
251251
'rule_type' => 'warning',
252252
'summary' => esc_html__( 'A Link to PDF warning means that one or more of the links on your page or post directs to a PDF file. This warning is a reminder to manually test the linked PDF for accessibility and to confirm that it conforms to all relevant WCAG guidelines. To resolve a Link to PDF warning, you need to: (1) ensure a direct link to view or download the document is present if you\'re using a plugin to embed it on the page; (2) ensure the link to the document warns users it is a link to a document by displaying the specific file extension in the link anchor; and (3) test and remediate your document for accessibility errors. After determining your file is fully accessible, you can safely “Ignore” the warning.', 'accessibility-checker' ),
253+
'ruleset' => 'js',
253254
],
254255
[
255256
'title' => esc_html__( 'Link to Non-HTML File', 'accessibility-checker' ),

includes/rules/link_ms_office_file.php

Lines changed: 0 additions & 44 deletions
This file was deleted.

includes/rules/link_pdf.php

Lines changed: 0 additions & 32 deletions
This file was deleted.

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.16.1",
3+
"version": "1.16.2",
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: 13 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: equalizedigital, alh0319, stevejonesdev
33
Tags: accessibility, accessible, wcag, ada, WP accessibility
44
Requires at least: 6.2
55
Tested up to: 6.7.0
6-
Stable tag: 1.16.1
6+
Stable tag: 1.16.2
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -171,8 +171,16 @@ No, Accessibility Checker runs completely on your server and does not require yo
171171

172172
== Changelog ==
173173

174+
= 1.16.2 =
175+
176+
* Enhancement: Use better names for fix modal titles.
177+
* Enhancement: Improve the link_pdf rule to detect more accurately.
178+
* Enhancement: Improve the link_ms_office_doc rule to detect more accurately.
179+
* Fixed: Rely on labels for link_ambiguous_text rule first before checking just the text content.
180+
* Fixed: Remove a duplicatable rule empty_form_label.
181+
174182
= 1.16.1 =
175-
* Fix: Remove redundant empty_form_label rule definition.
183+
* Fixed: Remove redundant empty_form_label rule definition.
176184

177185
= 1.16.0 =
178186
* New: Introduced a system to handle automated fixes for issues that the scanner would discover.
@@ -191,9 +199,9 @@ No, Accessibility Checker runs completely on your server and does not require yo
191199
* Enhancement: Improve the document title check to check on fully rendered pages.
192200
* Enhancement: Add a clear button to the editor to allow for .
193201
* Enhancement: Improved GTM iframe detection.
194-
* Fix: Avoid showing 100% passed results when scans are not complete.
195-
* Fix: Improve or add better aria-labels in several places.
196-
* Fix: Don't flag empty paragraphs if they have aria-hidden.
202+
* Fixed: Avoid showing 100% passed results when scans are not complete.
203+
* Fixed: Improve or add better aria-labels in several places.
204+
* Fixed: Don't flag empty paragraphs if they have aria-hidden.
197205

198206
= 1.15.3 =
199207
* Enhancement: Detect missing labels on more elements.
@@ -214,46 +222,5 @@ No, Accessibility Checker runs completely on your server and does not require yo
214222
* Fixed: Handle stacking contexts for callout button in admin correctly
215223
* Fixed: PHP 8.4 deprecation notice fix for implicitly nullable Meta_Boxes
216224

217-
= 1.14.3 =
218-
* Fixed: Allow empty_link rule to detect actually empty links
219-
220-
= 1.14.2 =
221-
* Enhancement: Reduce false positives for underlined text check
222-
* Fixed: Frontend highlighter could not be moved to the right side of the window on mobile
223-
* Fixed: Issue where ignores were not being saved and failing silently
224-
225-
= 1.14.1 =
226-
* Fixed: Prevent settings page layout issue
227-
228-
= 1.14.0 =
229-
* Added: Option to move front-end highlighter to opposite side of the window
230-
* Fixed: Prevent image from overspilling container in issue view
231-
* Fixed: Make empty paragraph check more accurate
232-
* Enhancement: Improved styling for settings page
233-
* Enhancement: Updated summary widget with better semantics
234-
* Enhancement: Improved aria labeling for view on page links
235-
* Enhancement: Added large batch processing capabilities for issue ignoring
236-
237-
= 1.13.1 =
238-
* Enhancement: Make the new window warning detection less rigid
239-
* Fixed: Avoid flagging possible headings when the entire text is not wrapped
240-
* Fixed: Allow JS checked rules to retain ignored state between scans
241-
242-
= 1.13.0 =
243-
* Added: Meta Viewport zoom-able and scale-able check
244-
* Added: Empty Paragraph warning
245-
* Fixed: Properly determine possible headings with computed styles
246-
* Improved: Better detection of the underlined text
247-
* Improved: Better detection of small text
248-
* Improved: Better detection of justified text
249-
* Improved: Better detection of blink and marquee tags
250-
* Improved: No longer flagging GTM iframes as missing title since they are display: none and visibility: hidden
251-
* Enhancement: Do not show 'View on page' link to frontend when the issues cannot be viewed
252-
253-
= 1.12.0 =
254-
* Fixed: Use the last generation time in summary widgets rather than last completed scan time
255-
* Improved: More accessible panels in the editor
256-
* Improved: Filter and action docs added/improved
257-
258225
Older versions can be found in the plugins `changelog.txt`.
259226

src/admin/summary/summary-tab-input-event-handlers.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,16 @@ export const initFixButtonEventHandlers = () => {
139139
fixSettings.classList.toggle( 'active' );
140140
document.querySelector( 'body' ).classList.add( 'edac-fix-modal-present' );
141141

142+
// try to find a fancy name for the modal
143+
const fancyNameEl = fixSettings.querySelector( '[data-fancy-name]' );
144+
let modalTitle = __( 'Fix Settings', 'accessibility-checker' );
145+
if ( fancyNameEl && fancyNameEl.getAttribute( 'data-fancy-name' ).length > 0 ) {
146+
modalTitle = fancyNameEl.getAttribute( 'data-fancy-name' );
147+
}
148+
142149
// trigger a thickbox that contains the contents of the fixSettings
143150
// eslint-disable-next-line no-undef
144-
tb_show( __( 'Fix Settings', 'accessibility-checker' ), '#TB_inline?width=750&inlineId=' + fixSettings.id );
151+
tb_show( modalTitle, '#TB_inline?width=750&inlineId=' + fixSettings.id );
145152

146153
const thickbox = document.getElementById( 'TB_window' );
147154
thickbox.querySelector( '[aria-live]' ).innerText = '';

src/pageScanner/checks/has-ambiguous-text.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ const checkAmbiguousPhrase = ( text ) => {
3333
export default {
3434
id: 'has_ambiguous_text',
3535
evaluate: ( node ) => {
36-
const textContent = node.textContent;
37-
if ( checkAmbiguousPhrase( textContent ) ) {
38-
return true;
39-
}
40-
4136
if ( node.hasAttribute( 'aria-label' ) ) {
4237
const ariaLabel = node.getAttribute( 'aria-label' );
4338
return checkAmbiguousPhrase( ariaLabel );
@@ -49,6 +44,10 @@ export default {
4944
return checkAmbiguousPhrase( labelText );
5045
}
5146

47+
if ( node.textContent && node.textContent !== '' ) {
48+
return checkAmbiguousPhrase( node.textContent );
49+
}
50+
5251
const images = node.querySelectorAll( 'img' );
5352
for ( const image of images ) {
5453
const altText = image.getAttribute( 'alt' );

0 commit comments

Comments
 (0)