Skip to content

Accessibility + hardening deltas from the dev line (1.6163.2212) - #3

Merged
thisismyurl merged 1 commit into
mainfrom
merge/dev-a11y-deltas
Jun 13, 2026
Merged

Accessibility + hardening deltas from the dev line (1.6163.2212)#3
thisismyurl merged 1 commit into
mainfrom
merge/dev-a11y-deltas

Conversation

@thisismyurl

Copy link
Copy Markdown
Owner

What this is

Reconciliation of the canonical colophon repo with the monorepo's embedded copy (aios:clients/thisismyurl/themes/colophon). The two had diverged after the shared 1.6148 base:

  • This repo advanced on packaging/architecture.php patterns, bundled fonts, packaging tools, GitHub Pages preview, repo scaffolding.
  • The dev copy advanced on accessibility + hardening (its 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 -l clean.

Ported (clean a11y + hardening)

WCAG 2.1 1.3.1 — exactly one h1 per template

  • front-page, page-blank: empty, editor-fillable h1 block
  • index, archive: query-title promoted to level:1
  • search: query-title rendered as the h1; redundant "Search Results" eyebrow removed

Hardening

  • Comment-form attribute injection → guarded preg_replace (single replacement, null-check, no-match fallback) replacing a naive str_replace that could double-inject/mangle
  • oEmbed content width now reads theme.json contentSize (pixel-validated, 720px fallback)
  • colophon/developer_guide_url filter on the Get started screen

Deliberately NOT ported (dev defects / regressions)

  • inc/bindings.phpcorrupted in dev (a binding source duplicated 24×, hard parse error at line 118). This repo's bindings.php is already clean and complete.
  • 404.html — dev removed the helpful "try searching / return home" guidance. Kept this repo's better version.
  • page-blank chrome — dev re-added header/footer to a deliberately bare template. Took only the h1.
  • theme.json font-scale bloat — dev bolted a redundant numeric 30–80 scale on top of the clean xs…2xl scheme.

Held for your decision (separate change)

  1. Footer credit backlink — dev adds a second footer line ("Learn more about Colophon" → thisismyurl.com). It's a WP.org-distribution-policy call (themes restrict footer credit links), not a clean a11y win.
  2. Four extra styles (cool/dark/high-contrast/sepia) — palette-compatible but dev wrote them malformed (version: 1/styles.json schema; WP needs version: 3). dark likely duplicates midnight; high-contrast is 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.php parse 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

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>
Copilot AI review requested due to automatic review settings June 13, 2026 02:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 (via query-title level 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_replace with a single guarded preg_replace, and derive oEmbed content_width from theme.json contentSize when 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 thread templates/front-page.html
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 thread templates/page-blank.html
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 -->
Comment thread style.css
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
@thisismyurl
thisismyurl merged commit 420cf3c into main Jun 13, 2026
1 check passed
@thisismyurl
thisismyurl deleted the merge/dev-a11y-deltas branch June 13, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants