Release v1.47.0#1834
Conversation
Agent-Logs-Url: https://github.com/equalizedigital/accessibility-checker/sessions/5add204d-d436-4544-9c42-3b121f54713e Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
When show_on_front=posts, WordPress sets the global $post to the first blog post rather than a page object. Both the frontend highlighter and the admin editor app were passing that post's ID to scan storage, attributing homepage issues to the wrong entry. Frontend: pass null (not the first post's ID) to edac_filter_frontend_highlight_post_id when is_home() && is_front_page() && show_on_front=posts, so the free plugin bails cleanly and Pro can supply a virtual-page ID via the filter. Admin: add edac_filter_admin_post_id so extensions can correct the post ID when the FSE site editor sets $post to the first blog post. Add edac_filter_post_is_latest_posts_home so Pro can flag a virtual homepage page and trigger use of get_home_url() for the scanner iframe instead of an invalid preview URL. Fixes PRO-726 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Remove redundant show_on_front check in frontend highlighter; rely on is_home() && is_front_page() to cover both the explicit "latest posts" setting and the fallback where show_on_front=page with no page_on_front - Broaden $is_latest_posts_home condition in admin enqueue to include the same fallback case (show_on_front=page but page_on_front is empty) - Recompute $active from the filtered $post_id's post type so extensions that override the post ID via edac_filter_admin_post_id get a correct active flag rather than one based on the pre-filter global $post - Add tests covering the fallback homepage case and the $active recomputation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
wp_localize_script serializes PHP false as an empty string ("") rather
than JSON false in current WP versions, so match either form in the
regex to keep the test passing across WP releases.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
WP < 6.9 escapes forward slashes as \/ in json_encode output, so asserting the literal home URL string fails on those builds. Apply the same version-conditional str_replace pattern already used by the existing permalink tests. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… whitespace-only href test Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
…callers Co-authored-by: pattonwebz <3902039+pattonwebz@users.noreply.github.com>
The Simplified Summary textareas in the editor sidebar relied solely on placeholder text for their accessible name, which disappears once the user types. Add a visually hidden label so assistive technology always announces the field's purpose (WCAG 3.3.2). Fixes #1766 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016H6Hjd5LrCUVG8LYiQ6y7X
The magenta outline used to highlight elements with issues can lack sufficient contrast against page backgrounds close to that color. A white box-shadow ring between the element and the outline ensures the indicator stays visible regardless of the underlying page colors. Fixes #1768
[Backport] Release v1.46.0
…images The metabox's details panel previously injected an issue's raw SVG markup straight into the panel's HTML. Convert it to a data: URI and render it inside an <img> instead, the same technique already used for inline SVGs in the issue modal's image finder (IssueImage.js) - this keeps the metabox and the sidebar/modal consistent in how they display this content, and matches how untrusted markup should be handled here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…rim docblock Address review feedback on PR #1832 (CodeRabbit + Gemini Code Assist): add a return type declaration, tighten the docblock down to the non-obvious "why", and cover a combined-vector payload plus non-string inputs in tests. The parameter itself stays untyped: a strict `string` type hint would turn a wrong-type caller into a fatal TypeError. Instead the function checks is_string() itself and always returns a valid (if payload-less) data: URI, even on bad input. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Review feedback on PR #1832: plain esc_url() rejects data: URIs and returns '' - callers must pass a protocols list that includes 'data', as the Ajax::details() call site does. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…a-is-missing-a-programmatic-label
…d-summary-text-area-is-missing-a-programmatic-label Add programmatic label to Simplified Summary textarea
…e-snippets-as-images Render SVG code snippets in the Accessibility Analysis panel as images
…ecker-1768-20zfvs Add white contrast ring around highlighted element outline
Reduce the added inline comments and test docblocks to 1-2 sentences, drop the ephemeral "Before Fix 3" reference, and restore the pull/9557 URL that had a stray period inserted. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…-empty-alt Skip 1x1 tracking pixels with empty alt in img_alt_empty_check
…/pro-726-when-site-has-latest-posts-set-as-the-home-location-the-scan # Conflicts: # tests/phpunit/includes/classes/EnqueueFrontendTest.php
…opback-check Remove unused `is_domain_loopback` helper
…ame-cache Fix stale table-name cache in validator
…proper-protocol-validator Enhance link validation to trim whitespace and normalize href checks
…-has-latest-posts-set-as-the-home-location-the-scan Fix: use correct post ID when site homepage is set to latest posts (PRO-726)
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces several improvements and bug fixes, including rendering SVGs as data URIs in tags to prevent script execution, resolving issues with latest-posts homepages in admin and frontend enqueuing, fixing a caching bug in table name validation, skipping 1x1 tracking pixels in empty alt checks, and adding missing labels for accessibility. Feedback on these changes highlights a duplicate test case in linkImproper.test.js, the need for an explanatory comment when using !important in SASS, and a recommendation to parse width and height attributes as integers for more robust tracking pixel detection.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| { | ||
| name: 'Fails when anchor href contains only whitespace', | ||
| html: '<a href=" ">Whitespace link</a>', | ||
| shouldPass: false, | ||
| }, | ||
| { | ||
| name: 'Fails when anchor href contains only whitespace', | ||
| html: '<a href=" ">Whitespace link</a>', | ||
| shouldPass: false, | ||
| }, |
There was a problem hiding this comment.
There is a duplicate test case for 'Fails when anchor href contains only whitespace' in this file. Please remove the redundant test case to keep the test suite clean and maintainable.
| { | |
| name: 'Fails when anchor href contains only whitespace', | |
| html: '<a href=" ">Whitespace link</a>', | |
| shouldPass: false, | |
| }, | |
| { | |
| name: 'Fails when anchor href contains only whitespace', | |
| html: '<a href=" ">Whitespace link</a>', | |
| shouldPass: false, | |
| }, | |
| { | |
| name: 'Fails when anchor href contains only whitespace', | |
| html: '<a href=" ">Whitespace link</a>', | |
| shouldPass: false, | |
| }, |
| outline-offset: 5px !important; | ||
| outline-offset: 2px !important; | ||
| outline-color: magenta !important; | ||
| box-shadow: 0 0 0 8px variables.$color-white !important; |
There was a problem hiding this comment.
According to the general rules, the use of !important is acceptable only when accompanied by an explanatory comment. Please add a comment explaining why !important is required for this box-shadow rule.
| box-shadow: 0 0 0 8px variables.$color-white !important; | |
| // Box shadow requires !important to override theme-specific focus styles on highlighted elements. | |
| box-shadow: 0 0 0 8px variables.$color-white !important; |
References
- If !important is required for compatibility reasons, its use is acceptable when accompanied by an explanatory comment.
| const widthAttr = node.getAttribute( 'width' ); | ||
| const heightAttr = node.getAttribute( 'height' ); | ||
| if ( widthAttr === '1' && heightAttr === '1' ) { | ||
| return true; | ||
| } |
There was a problem hiding this comment.
Using strict string equality (=== '1') to check the width and height attributes can be fragile if the attributes contain units (e.g., 1px) or leading/trailing whitespace. Parsing the attributes with parseInt is more robust and prevents potential false positives.
| const widthAttr = node.getAttribute( 'width' ); | |
| const heightAttr = node.getAttribute( 'height' ); | |
| if ( widthAttr === '1' && heightAttr === '1' ) { | |
| return true; | |
| } | |
| const widthAttr = node.getAttribute( 'width' ); | |
| const heightAttr = node.getAttribute( 'height' ); | |
| if ( parseInt( widthAttr, 10 ) === 1 && parseInt( heightAttr, 10 ) === 1 ) { | |
| return true; | |
| } |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
✅ Accessibility Checker build (primary only)
|
Release v1.47.0 (minor).
Changelog
2026-07-14 - version 1.47.0
Added to both
readme.txtandchangelog.txton this branch.Merged PRs in this release (from
scripts/prep_release.sh minor)Steve Jones (5):
is_domain_loopbackhelper (Remove unusedis_domain_loopbackhelper #1437)William Patton (4):
Also updated by the release script
Requires at leastbumped to WordPress 6.8 (2 versions back fromTested up to: 7.0)@sinceplaceholder resolved to 1.47.0 inincludes/helper-functions.php🤖 Generated with Claude Code