Accessibility + hardening deltas from the dev line (1.6163.2212) - #3
Merged
Conversation
Ports the clean, verified improvements from the monorepo's embedded copy of Colophon onto the canonical repo. The dev copy had diverged on the accessibility axis while this repo advanced on packaging/architecture; this brings the a11y and hardening work across without disturbing the repo's .php-pattern/font/packaging structure. Accessibility (WCAG 2.1 1.3.1 — single h1 per template): - front-page, page-blank: empty editor-fillable h1 block - index, archive: query-title promoted to h1 (level:1) - search: query-title rendered as the h1, redundant eyebrow label removed Hardening: - comment-form attribute injection now uses a guarded preg_replace (single replacement, null-check, no-match fallback) instead of a naive str_replace that could double-inject or mangle markup - oEmbed content width reads from theme.json contentSize (pixel-validated, 720px fallback) instead of a hardcoded literal - developer-guide URL on the Get started screen is filterable via colophon/developer_guide_url Deliberately NOT ported from dev: a corrupted inc/bindings.php (a binding source duplicated 24x — parse error), a 404 template that dropped helpful guidance text, a page-blank that re-added site chrome against its purpose, and theme.json font-scale bloat. Four extra style variants and a footer backlink change are held for a separate design/policy decision. Version 1.6163.2212. php -l clean. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR reconciles the canonical Colophon theme with a verified-clean subset of “dev line” accessibility and hardening deltas, aiming to improve heading structure (WCAG 2.1 1.3.1), tighten comment-form field attribute injection, and align embed sizing with theme.json.
Changes:
- Standardize templates to render the primary page heading as an
h1(viaquery-titlelevel 1 on archive/search/index, and explicit heading blocks on front-page/page-blank). - Harden comment-form input attribute injection by replacing an unbounded
str_replacewith a single guardedpreg_replace, and derive oEmbedcontent_widthfromtheme.jsoncontentSizewhen valid. - Make the “developer guide” link on the Get started screen filterable and bump theme version/changelog metadata.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| templates/search.html | Promotes search query title to h1 and removes the redundant “Search Results” eyebrow. |
| templates/page-blank.html | Adds an h1 block intended to ensure a single top-level heading on the blank template. |
| templates/index.html | Adds a query-title rendered at h1 level for consistent heading structure. |
| templates/front-page.html | Adds an h1 block intended for editor-provided front page heading content. |
| templates/archive.html | Promotes archive title to h1 via query-title level 1. |
| inc/setup.php | Reads oEmbed content width from theme.json and hardens comment-form attribute injection. |
| inc/admin.php | Documents hooks and makes the developer guide URL filterable via colophon/developer_guide_url. |
| style.css | Bumps theme header version. |
| readme.txt | Updates stable tag and changelog to reflect the new release/version. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+10
to
+16
| <!-- Page heading (required per WCAG 2.1 1.3.1). | ||
| Every page must have exactly one h1. This heading block is empty; | ||
| editors must add a title in the Site Editor. Example: "Home", "About", or your site's tagline. | ||
| Do NOT delete this block; instead, click and add text. --> | ||
| <!-- wp:heading {"level":1,"align":"center","style":{"spacing":{"margin":{"bottom":"var:preset|spacing|10"}},"typography":{"fontSize":"var:preset|font-size|2xl"}}} --> | ||
| <h1 class="wp-block-heading has-text-align-center" style="margin-bottom:var(--wp--preset--spacing--10);font-size:var(--wp--preset--font-size--2xl)"></h1> | ||
| <!-- /wp:heading --> |
Comment on lines
+8
to
+14
| <!-- Page heading (required per WCAG 2.1 1.3.1). | ||
| Every page needs exactly one h1. This block is empty; editors add a | ||
| title in the Site Editor (example: "Landing", "Offer", or your own). | ||
| Do not delete this block — click it and add text. --> | ||
| <!-- wp:heading {"level":1} --> | ||
| <h1></h1> | ||
| <!-- /wp:heading --> |
| Author URI: https://thisismyurl.com/ | ||
| Description: A minimal WordPress FSE starter theme. The shared foundation beneath Kern, Masthead, Parcel, and Wake — four niche editorial themes built on it. Use it as-is for a clean, accessible start, or build on the CORE/SKIN architecture to make your own themed version without touching the portable core files. | ||
| Version: 1.6159.0900 | ||
| Version: 1.6163.2212 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
Reconciliation of the canonical
colophonrepo with the monorepo's embedded copy (aios:clients/thisismyurl/themes/colophon). The two had diverged after the shared1.6148base:.phppatterns, bundled fonts, packaging tools, GitHub Pages preview, repo scaffolding.1.6160"developer round 4" pass) — but that copy is not clean (see below).This PR ports only the verified-clean dev deltas onto the canonical structure. Every PHP file is
php -lclean.Ported (clean a11y + hardening)
WCAG 2.1 1.3.1 — exactly one h1 per template
front-page,page-blank: empty, editor-fillable h1 blockindex,archive: query-title promoted tolevel:1search: query-title rendered as the h1; redundant "Search Results" eyebrow removedHardening
preg_replace(single replacement, null-check, no-match fallback) replacing a naivestr_replacethat could double-inject/mangletheme.jsoncontentSize(pixel-validated, 720px fallback)colophon/developer_guide_urlfilter on the Get started screenDeliberately NOT ported (dev defects / regressions)
inc/bindings.php— corrupted in dev (a binding source duplicated 24×, hard parse error at line 118). This repo'sbindings.phpis already clean and complete.404.html— dev removed the helpful "try searching / return home" guidance. Kept this repo's better version.page-blankchrome — dev re-added header/footer to a deliberately bare template. Took only the h1.theme.jsonfont-scale bloat — dev bolted a redundant numeric30–80scale on top of the cleanxs…2xlscheme.Held for your decision (separate change)
cool/dark/high-contrast/sepia) — palette-compatible but dev wrote them malformed (version: 1/styles.jsonschema; WP needsversion: 3).darklikely duplicatesmidnight;high-contrastis the one with clear a11y merit. Happy to re-author whichever you want in the correct format.Note
Dev's embedded colophon currently ships a fatal
bindings.phpparse error — worth knowing the monorepo copy is broken; this repo is the sound base. This is the first of nine theme reconciliations; the other eight follow the same clean-wins pattern.🤖 Generated with Claude Code