v0.3.0 - Polish: accessibility, security, performance, RTL, French translation
All checks were successful
Create Release Package / PHP Lint (push) Successful in 52s
Create Release Package / Build Release (push) Successful in 1m21s

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-02-08 16:27:13 +01:00
parent cc8dc9d357
commit eb5ac6f7ad
33 changed files with 1270 additions and 39 deletions

View File

@@ -34,7 +34,7 @@ This project is proudly **"vibe-coded"** using Claude.AI - the entire codebase w
**Note for AI Assistants:** Clean this section after the specific features are done or new releases are made. Effective changes are tracked in `CHANGELOG.md`. Do not add completed versions here - document them in the Session History section at the end of this file.
Current version is **v0.2.0** - Design Editor. Next milestone is **v0.3.0 - Polish**. See `PLAN.md` for details.
Current version is **v0.3.0** - Polish. Next milestone is **v1.0.0 - Release**. See `PLAN.md` for details.
## Technical Stack
@@ -193,6 +193,35 @@ Build steps (in order):
## Session History
### Session 5 — v0.3.0 Polish (2026-02-08)
**Completed:** Accessibility audit and fixes, security hardening, performance optimization, RTL language support, French translation, inline style cleanup.
**What was built:**
- Skip-to-content link in `base.html.twig` with visually-hidden CSS class (visible on focus)
- ARIA labels on all `<nav>` elements across 4 header variants, 2 footer variants, and sidebar
- `aria-current="page"` on active dropdown items in all header variants
- `loading="lazy"` on post thumbnails, card images, and comment avatars
- Screen reader announcement (`aria-live="polite"`) in `dark-mode.js` for theme toggle
- Font preload `<link>` tags for Inter and Lora `.woff2` files via `wp_head` priority 1
- RTL stylesheet (`src/scss/rtl.scss`) conditionally loaded when `is_rtl()` is true
- Logical CSS properties (`border-inline-start`, `padding-inline-start`) replacing physical directions in block styles
- French translation (`fr_FR.po`) covering all ~216 translatable strings
- CSS classes replacing inline styles: `.post-thumbnail`, `.card-thumbnail`, `.sidebar-heading`, `.hero-overlay`
- XSS fix in search template: `search_query|e('html')` before `|raw` output
- Explicit `esc_url()` on comment author URLs in Twig
- Updated `.pot` and `de_CH.po` with 4 new accessibility strings
- RTL build step added to npm scripts
**Key learnings:**
- WordPress `is_rtl()` detects RTL locales, allowing conditional stylesheet loading without doubling CSS bundle size
- CSS logical properties (`border-inline-start`, `padding-inline-start`) are the modern approach to RTL support, replacing physical left/right properties
- Twig `|e('html')` filter must be applied *before* concatenation with `|raw` HTML to prevent XSS -- `search_query|e('html')` inside a `|format()` call
- Font preloading via `wp_head` at priority 1 ensures preload hints appear before render-blocking stylesheets
- `aria-live="polite"` with `role="status"` announces dynamic changes to screen readers without interrupting current reading flow
### Session 4 — v0.2.0 Design Editor (2026-02-08)
**Completed:** Full Design Editor compatibility, custom block categories, page templates, header/footer/navigation variations.