Skip to content

Commit ffecef8

Browse files
authored
Merge pull request #1300 from equalizedigital/release/1.35.0
[Backport] Release v1.35.0
2 parents 475bd3e + 49562b3 commit ffecef8

6 files changed

Lines changed: 127 additions & 37 deletions

File tree

.github/workflows/build-plugin-with-ref.yml

Lines changed: 97 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
if: |
2525
github.event_name == 'release' ||
2626
github.event_name == 'workflow_dispatch' ||
27-
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'gha-build'))
27+
(github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'gha-build') || contains(github.event.pull_request.labels.*.name, 'gha-build-all')))
2828
2929
steps:
3030
- name: Checkout repository
@@ -51,10 +51,17 @@ jobs:
5151
elif [ "$MODE" = "release" ]; then
5252
echo "ref_param=woocommerce" >> $GITHUB_OUTPUT
5353
echo "skip_primary=false" >> $GITHUB_OUTPUT
54-
# PR labeled: build primary only; set empty ref
54+
# PR labeled: check which label
5555
else
56-
echo "ref_param=" >> $GITHUB_OUTPUT
57-
echo "skip_primary=false" >> $GITHUB_OUTPUT
56+
# Check if gha-build-all label is present (build both)
57+
if echo "${{ github.event.pull_request.labels.*.name }}" | grep -q "gha-build-all"; then
58+
echo "ref_param=woocommerce" >> $GITHUB_OUTPUT
59+
echo "skip_primary=false" >> $GITHUB_OUTPUT
60+
else
61+
# gha-build label (build primary only)
62+
echo "ref_param=" >> $GITHUB_OUTPUT
63+
echo "skip_primary=false" >> $GITHUB_OUTPUT
64+
fi
5865
fi
5966
6067
- name: Show selected mode/ref
@@ -73,6 +80,14 @@ jobs:
7380
cache: 'npm'
7481
cache-dependency-path: package-lock.json
7582

83+
- name: Cache node_modules
84+
uses: actions/cache@v4
85+
with:
86+
path: node_modules
87+
key: node-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
88+
restore-keys: |
89+
node-${{ runner.os }}-
90+
7691
- name: Set up PHP
7792
uses: shivammathur/setup-php@v2
7893
with:
@@ -86,14 +101,24 @@ jobs:
86101
87102
- name: Install npm dependencies
88103
run: |
89-
if [ -f package.json ]; then npm ci || npm install; else echo "No package.json"; fi
104+
if [ -f package.json ]; then
105+
if [ -d node_modules ]; then
106+
echo "node_modules cache hit, skipping install"
107+
else
108+
npm ci --prefer-offline --no-audit
109+
fi
110+
else
111+
echo "No package.json"
112+
fi
90113
91-
- name: Get short commit hash for PR builds
92-
if: github.event_name == 'pull_request'
93-
id: commit
114+
- name: Extract plugin version and commit hash
115+
id: version
94116
run: |
117+
VERSION=$(grep "Version:" accessibility-checker.php | head -1 | sed 's/.*Version:[[:space:]]*\([^ ]*\).*/\1/')
95118
SHORT_SHA=$(git rev-parse --short HEAD)
119+
echo "version=$VERSION" >> $GITHUB_OUTPUT
96120
echo "short_sha=$SHORT_SHA" >> $GITHUB_OUTPUT
121+
echo "Plugin version: $VERSION"
97122
echo "Short commit hash: $SHORT_SHA"
98123
99124
- name: Verify EDAC_REF_PARAM is empty before first build
@@ -115,25 +140,43 @@ jobs:
115140
exit 1
116141
fi
117142
mkdir -p builds
118-
PRIMARY_ZIP_NAME=$(basename "$ZIP_PATH")
119143
120-
# For PR builds, add commit hash to filename before .zip
121-
if [ "${{ github.event_name }}" = "pull_request" ] && [ -n "${{ steps.commit.outputs.short_sha }}" ]; then
122-
ZIP_BASENAME="${PRIMARY_ZIP_NAME%.zip}"
123-
PRIMARY_ZIP_NAME="${ZIP_BASENAME}-${{ steps.commit.outputs.short_sha }}.zip"
144+
# Construct the new filename based on trigger mode
145+
VERSION="${{ steps.version.outputs.version }}"
146+
SHORT_SHA="${{ steps.version.outputs.short_sha }}"
147+
148+
if [ "${{ github.event_name }}" = "pull_request" ]; then
149+
# PR: accessibility-checker-{version}-{prnumber}-{hash}.zip
150+
PRIMARY_ZIP_NAME="accessibility-checker-${VERSION}-${{ github.event.pull_request.number }}-${SHORT_SHA}.zip"
151+
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
152+
# Manual: accessibility-checker-{version}-{hash}.zip
153+
PRIMARY_ZIP_NAME="accessibility-checker-${VERSION}-${SHORT_SHA}.zip"
154+
elif [ "${{ github.event_name }}" = "release" ]; then
155+
# Release: accessibility-checker-{version}.zip
156+
PRIMARY_ZIP_NAME="accessibility-checker-${VERSION}.zip"
157+
else
158+
# Fallback
159+
PRIMARY_ZIP_NAME="accessibility-checker-${VERSION}-${SHORT_SHA}.zip"
124160
fi
125161
126162
mv "$ZIP_PATH" "builds/$PRIMARY_ZIP_NAME"
163+
PRIMARY_ZIP_BASENAME="${PRIMARY_ZIP_NAME%.zip}"
164+
unzip -q "builds/$PRIMARY_ZIP_NAME" -d "builds/$PRIMARY_ZIP_BASENAME"
165+
PRIMARY_ZIP_FOLDER="builds/$PRIMARY_ZIP_BASENAME"
166+
PRIMARY_ZIP_NAME_NO_EXT="${PRIMARY_ZIP_NAME%.zip}"
127167
echo "PRIMARY_ZIP_PATH=builds/$PRIMARY_ZIP_NAME" >> $GITHUB_ENV
128168
echo "PRIMARY_ZIP_NAME=$PRIMARY_ZIP_NAME" >> $GITHUB_ENV
169+
echo "PRIMARY_ZIP_NAME_NO_EXT=$PRIMARY_ZIP_NAME_NO_EXT" >> $GITHUB_ENV
170+
echo "PRIMARY_ZIP_FOLDER=$PRIMARY_ZIP_FOLDER" >> $GITHUB_ENV
129171
echo "Produced primary zip: builds/$PRIMARY_ZIP_NAME"
172+
echo "Produced primary folder: $PRIMARY_ZIP_FOLDER"
130173
131174
- name: Upload primary build artifact
132175
if: steps.setref.outputs.skip_primary != 'true'
133176
uses: actions/upload-artifact@v4
134177
with:
135-
name: accessibility-checker-primary-${{ github.event.pull_request.number || github.event.release.tag_name || 'manual' }}
136-
path: ${{ env.PRIMARY_ZIP_PATH }}
178+
name: ${{ env.PRIMARY_ZIP_NAME_NO_EXT }}
179+
path: ${{ env.PRIMARY_ZIP_FOLDER }}
137180
if-no-files-found: error
138181

139182
- name: Check if ref build is needed
@@ -181,20 +224,33 @@ jobs:
181224
echo "Error: Could not locate produced zip after npm run dist" >&2
182225
exit 1
183226
fi
184-
ZIP_BASENAME=$(basename "$ZIP_PATH" .zip)
185227
mkdir -p builds
186-
REF_ZIP_NAME="${ZIP_BASENAME}-ref-${{ steps.setref.outputs.ref_param }}.zip"
228+
229+
VERSION="${{ steps.version.outputs.version }}"
230+
SHORT_SHA="${{ steps.version.outputs.short_sha }}"
231+
REF_VALUE="${{ steps.setref.outputs.ref_param }}"
232+
233+
# Ref build naming: accessibility-checker-{version}-ref-{refvalue}-{hash}.zip
234+
REF_ZIP_NAME="accessibility-checker-${VERSION}-ref-${REF_VALUE}-${SHORT_SHA}.zip"
235+
187236
mv "$ZIP_PATH" "builds/$REF_ZIP_NAME"
237+
REF_ZIP_BASENAME="${REF_ZIP_NAME%.zip}"
238+
unzip -q "builds/$REF_ZIP_NAME" -d "builds/$REF_ZIP_BASENAME"
239+
REF_ZIP_FOLDER="builds/$REF_ZIP_BASENAME"
240+
REF_ZIP_NAME_NO_EXT="${REF_ZIP_NAME%.zip}"
188241
echo "REF_ZIP_PATH=builds/$REF_ZIP_NAME" >> $GITHUB_ENV
189242
echo "REF_ZIP_NAME=$REF_ZIP_NAME" >> $GITHUB_ENV
243+
echo "REF_ZIP_NAME_NO_EXT=$REF_ZIP_NAME_NO_EXT" >> $GITHUB_ENV
244+
echo "REF_ZIP_FOLDER=$REF_ZIP_FOLDER" >> $GITHUB_ENV
190245
echo "Produced ref zip: builds/$REF_ZIP_NAME"
246+
echo "Produced ref folder: $REF_ZIP_FOLDER"
191247
192248
- name: Upload ref build artifact
193249
if: steps.check_ref.outputs.need_ref_build == 'true'
194250
uses: actions/upload-artifact@v4
195251
with:
196-
name: accessibility-checker-ref-${{ github.event.pull_request.number || github.event.release.tag_name || 'manual' }}
197-
path: ${{ env.REF_ZIP_PATH }}
252+
name: ${{ env.REF_ZIP_NAME_NO_EXT }}
253+
path: ${{ env.REF_ZIP_FOLDER }}
198254
if-no-files-found: error
199255

200256
- name: Upload to release (both zips)
@@ -214,10 +270,23 @@ jobs:
214270
with:
215271
script: |
216272
const prNumber = context.payload.pull_request.number;
217-
const runUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
218-
const primaryName = process.env.PRIMARY_ZIP_NAME;
219-
const primaryPath = process.env.PRIMARY_ZIP_PATH;
220-
const body = `✅ Accessibility Checker build (primary only)\n\n- Artifact: **${primaryName}**\n- Path: \`${primaryPath}\`\n- Workflow run: [View logs](${runUrl})`;
273+
const runId = context.runId;
274+
const runUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}`;
275+
const primaryName = process.env.PRIMARY_ZIP_NAME_NO_EXT;
276+
277+
// Get the artifact ID for the download URL
278+
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
279+
owner: context.repo.owner,
280+
repo: context.repo.repo,
281+
run_id: runId,
282+
});
283+
284+
const artifact = artifacts.data.artifacts.find(a => a.name === primaryName);
285+
const downloadUrl = artifact
286+
? `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${runId}/artifacts/${artifact.id}`
287+
: runUrl;
288+
289+
const body = `✅ Accessibility Checker build (primary only)\n\n- **Artifact**: [Download ${primaryName}.zip](${downloadUrl})\n- **Workflow run**: [View logs](${runUrl})`;
221290
await github.rest.issues.createComment({
222291
owner: context.repo.owner,
223292
repo: context.repo.repo,
@@ -231,17 +300,18 @@ jobs:
231300
with:
232301
script: |
233302
const prNumber = context.payload.pull_request.number;
234-
const labelName = 'gha-build';
303+
const labels = context.payload.pull_request.labels.map(l => l.name);
304+
const labelToRemove = labels.includes('gha-build-all') ? 'gha-build-all' : 'gha-build';
235305
try {
236306
await github.rest.issues.removeLabel({
237307
owner: context.repo.owner,
238308
repo: context.repo.repo,
239309
issue_number: prNumber,
240-
name: labelName,
310+
name: labelToRemove,
241311
});
242-
console.log(`Removed label '${labelName}' from PR #${prNumber}`);
312+
console.log(`Removed label '${labelToRemove}' from PR #${prNumber}`);
243313
} catch (e) {
244-
console.log(`Could not remove label '${labelName}' from PR #${prNumber}: ${e.message}`);
314+
console.log(`Could not remove label '${labelToRemove}' from PR #${prNumber}: ${e.message}`);
245315
}
246316
247317
- name: Summary

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

4242
// Current database version.

changelog.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11
*** Accessibility Checker ***
2+
2025-12-05 - version 1.35.0
3+
* Fix - Ignored issues no longer count in density scores.
4+
* Fix - Ignored issues count comparison and message logic in frontend highlighter.
5+
* Fix - Allow long translations to wrap in new window warning tooltip.
6+
* Fix - Improve sanitization that would prevent checkboxes saving on first attempt in some cases.
7+
* Fix - Dashboard widget to conditionally display upcoming meetups and improve meetup data handling.
8+
* Fix - Make highlighter controls translatable.
9+
* Tweak - Add better help article link for new window warning fix.
10+
* Tweak - Use WordPress data functions instead of server time for ignore date formatting.
211

312
2025-10-22 - version 1.34.0
413
* Tweak - Missing transcript can now detect transcripts for videos when they are not just direct siblings.

docs/hooks.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ This document is auto-generated by `tools/generate-hooks-docs.php`. It lists onl
2323
| `edac_filter_frontend_fixes_data` | filter | [tests/phpunit/includes/classes/Fixes/Fix/PreventLinksOpeningNewWindowFixTest.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/tests/phpunit/includes/classes/Fixes/Fix/PreventLinksOpeningNewWindowFixTest.php#L77) | 77 | Test link modification functionality. | |
2424
| `edac_filter_frontend_highlight_post_id` | filter | [includes/classes/class-enqueue-frontend.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/includes/classes/class-enqueue-frontend.php#L55) | 55 | Enqueue the frontend highlighter. | |
2525
| `edac_filter_frontend_highlighter_visibility` | filter | [admin/class-frontend-highlight.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/admin/class-frontend-highlight.php#L46) | 46 | Filter the visibility of the frontend highlighter. | 1.14.0 |
26-
| `edac_filter_generate_link_type_ref` | filter | [includes/helper-functions.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/includes/helper-functions.php#L607) | 607 | Generate links to pro page with some params. | |
26+
| `edac_filter_generate_link_type_ref` | filter | [includes/helper-functions.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/includes/helper-functions.php#L636) | 636 | Generate links to pro page with some params. | |
2727
| `edac_filter_insert_rule_data` | filter | [admin/class-insert-rule-data.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/admin/class-insert-rule-data.php#L135) | 135 | Filter the rule data before inserting it into the database. | 1.4.0 |
2828
| `edac_filter_js_violation_html` | filter | [includes/classes/class-rest-api.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/includes/classes/class-rest-api.php#L361) | 361 | REST handler that saves to the DB a list of js rule violations for a post. | |
2929
| `edac_filter_post_types` | filter | [includes/helper-functions.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/includes/helper-functions.php#L183) | 183 | Filter the post types that the plugin will check. | 1.4.0 |
30-
| `edac_filter_readability_content` | filter | [admin/class-ajax.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/admin/class-ajax.php#L606) | 606 | Filter the content used for reading grade readability analysis. | 1.4.0 |
31-
| `edac_filter_register_rules` | filter | [accessibility-checker.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/accessibility-checker.php#L137) | 137 | Filter the default rules. | 1.4.0 |
30+
| `edac_filter_readability_content` | filter | [admin/class-ajax.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/admin/class-ajax.php#L612) | 612 | Filter the content used for reading grade readability analysis. | 1.4.0 |
31+
| `edac_filter_register_rules` | filter | [accessibility-checker.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/accessibility-checker.php#L142) | 142 | Filter the default rules. | 1.4.0 |
3232
| `edac_filter_remove_admin_notices_screens` | filter | [admin/class-admin-notices.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/admin/class-admin-notices.php#L79) | 79 | Filter the screens where admin notices should be removed. | 1.14.0 |
3333
| `edac_filter_settings_capability` | filter | [admin/class-upgrade-promotion.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/admin/class-upgrade-promotion.php#L45) | 45 | Add the upgrade menu item. | 1.27.0 |
3434
| `edac_filter_settings_tab_items` | filter | [partials/settings-page.php](https://github.com/equalizedigital/accessibility-checker/blob/develop/partials/settings-page.php#L15) | 15 | Filter the settings tab items. | 1.4.0 |

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "accessibility-checker",
3-
"version": "1.34.0",
3+
"version": "1.35.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+",
@@ -10,14 +10,15 @@
1010
"build": "npx webpack",
1111
"dev": "npx webpack --watch --mode development",
1212
"dist": "npx webpack --mode production && composer install --no-dev && composer dump-autoload --no-dev -o && ./scripts/dist.sh && composer install",
13-
"dist:dotorg": "npx webpack --mode production && composer install --no-dev && composer dump-autoload --no-dev -o && ./scripts/dist.sh --keep-build-folder",
13+
"dist:dotorg": "npm run dist:keep-build-folder",
14+
"dist:keep-build-folder": "npx webpack --mode production && composer install --no-dev && composer dump-autoload --no-dev -o && ./scripts/dist.sh --keep-build-folder",
1415
"lint": "./vendor/bin/phpcs && npm run lint:js",
1516
"lint-staged-precommit": "lint-staged && npm run lint:js",
1617
"lint:php": "./vendor/bin/phpcs",
1718
"lint:php:fix": "./vendor/bin/phpcbf",
1819
"lint:js": "wp-scripts lint-js",
1920
"lint:js:fix": "wp-scripts lint-js --fix",
20-
"test:php": "./scripts/setup-phpunit.sh",
21+
"test:php": "./scripts/setup-phpunit.sh",
2122
"test:php:run": "docker compose exec phpunit vendor/bin/phpunit",
2223
"test:php:coverage": "docker compose exec phpunit vendor/bin/phpunit --coverage-clover=./coverage/clover.xml --coverage-html=./coverage/html",
2324
"test:php:stop": "docker compose stop",

readme.txt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
Contributors: equalizedigital, alh0319, stevejonesdev
33
Tags: accessibility, accessible, wcag, ada, WP accessibility
44
Requires at least: 6.6
5-
Tested up to: 6.8
6-
Stable tag: 1.34.0
5+
Tested up to: 6.9
6+
Stable tag: 1.35.0
77
License: GPLv2 or later
88
License URI: http://www.gnu.org/licenses/gpl-2.0.html
99

@@ -210,6 +210,16 @@ You can report security bugs through the Patchstack Vulnerability Disclosure Pro
210210
10. Accessibility Checker automated fix settings.
211211

212212
== Changelog ==
213+
2025-12-05 - version 1.35.0
214+
* Fix - Ignored issues no longer count in density scores.
215+
* Fix - Ignored issues count comparison and message logic in frontend highlighter.
216+
* Fix - Allow long translations to wrap in new window warning tooltip.
217+
* Fix - Improve sanitization that would prevent checkboxes saving on first attempt in some cases.
218+
* Fix - Dashboard widget to conditionally display upcoming meetups and improve meetup data handling.
219+
* Fix - Make highlighter controls translatable.
220+
* Tweak - Add better help article link for new window warning fix.
221+
* Tweak - Use WordPress data functions instead of server time for ignore date formatting.
222+
213223
2025-10-22 - version 1.34.0
214224
* Tweak - Missing transcript can now detect transcripts for videos when they are not just direct siblings.
215225
* Tweak - Use post type labels rather than slugs in views where applicable.

0 commit comments

Comments
 (0)