Title: Guardrail Blocks
Author: BreonWilliams
Published: <strong>Agẹmọ  13, 2026</strong>
Last modified: Agẹmọ  13, 2026

---

Ṣàwárí àwọn plugin

![](https://ps.w.org/guardrail-blocks/assets/icon.svg?rev=3606405)

# Guardrail Blocks

 Láti ọwọ́ [BreonWilliams](https://profiles.wordpress.org/breonwilliams/)

[Ṣe ìgbàsílẹ̀](https://downloads.wordpress.org/plugin/guardrail-blocks.0.1.1.zip)

 * [Àwọn àlàyé](https://yor.wordpress.org/plugins/guardrail-blocks/#description)
 * [Àwọn àgbéyẹ̀wò](https://yor.wordpress.org/plugins/guardrail-blocks/#reviews)
 * [Ìdàgbàsókè](https://yor.wordpress.org/plugins/guardrail-blocks/#developers)

 [Ìrànlọ́wọ́](https://wordpress.org/support/plugin/guardrail-blocks/)

## Àpèjúwe

Most accessibility failures on WordPress sites are authoring failures: a brand color
that doesnÌtumọ̀ Yorùbá: ’t meet WCAG contrast, a heading hierarchy scrambled by
reordering, an accordion built from divs with no keyboard support. They look fine
in the editor and fail the audit later.

Guardrail Blocks takes a different approach: instead of _offering_ accessible options,
its blocks make the failure impossible to author — and re-verify everything on every
page view.

#### The guarantees

 * **WCAG-safe color contrast** — Button backgrounds come only from your themeÌtumọ̀
   Yorùbá: ’s palette, and the most readable text color is chosen automatically (
   the live ratio is shown in the sidebar, e.g. “Contrast 8.36:1 — AA ✓”). The pairing
   is re-validated server-side on every page view against your themeÌtumọ̀ Yorùbá:’
   s _current_ palette, so switching themes or changing brand colors can never leave
   a failing button behind.
 * **Unbreakable heading hierarchy** — There is no heading level control anywhere.
   An Accessible Heading derives its level (H2–H6) from how Accessible Sections 
   are nested, and re-derives it when you reorder, nest, or un-nest — the document
   outline stays valid by construction. Card titles and accordion headers participate
   too, always one level below their sectionÌtumọ̀ Yorùbá: ’s heading.
 * **Correct interactive semantics** — The Accordion ships the full WAI-ARIA disclosure
   pattern: real buttons inside correctly-leveled headings, `aria-expanded`/`aria-
   controls` wiring, Enter/Space toggling, arrow-key navigation between headers,
   and content that stays reachable without JavaScript.
 * **Performance-correct media** — The Media Figure renders through coreÌtumọ̀ Yorùbá:’
   s responsive-image pipeline with explicit dimensions (no layout shift), `srcset`/`
   sizes`, a hero toggle for `fetchpriority="high"` (better LCP) vs. lazy loading,
   and alt text enforcement with editor warnings.

#### The blocks

Accessible Section, Accessible Heading, Accessible Button, Card + Card Grid, Accessible
Accordion, Notice (info/success/warning/error with correct ARIA roles), Media Figure,
and a Table of Contents that is generated from the pageÌtumọ̀ Yorùbá: ’s real outline
on every view — it can never go stale.

#### Safety nets

 * The **Outline Checker** panel (in the page sidebar) watches the whole document—
   including core Heading blocks — and flags skipped levels and extra H1s with one-
   click block selection.
 * Everything inherits your themeÌtumọ̀ Yorùbá: ’s colors, spacing, and typography
   via `theme.json`. Nothing fights your design.
 * The plugin makes **zero external requests** and collects no data.

#### Source code & development

The compiled block scripts in `build/` are generated with @wordpress/scripts (webpack).
The complete, human-readable source code is included with this plugin in the `src/`
directory (TypeScript and SCSS, one folder per block). To rebuild `build/` from 
it: `npm install && npm run build` (Node 22; `package.json` and `tsconfig.json` 
are included).

Development happens publicly at https://github.com/breonwilliams/guardrail-blocks,
which also carries the full test suite (Jest, PHPUnit, Playwright) and CI.

## Àwọn ìdí

Plugin yìí pèsè 10 àwọn ìdí.

 *   Accessible Heading A heading whose level (H2–H6) is set automatically from 
   where it sits in your section structure. You write the words; the correct level
   is guaranteed — even after reordering.
 *   Media Figure An image with performance-correct markup guaranteed: responsive
   sizes, explicit dimensions (no layout shift), smart loading priority, and enforced
   alt text.
 *   Notice A callout with the correct semantic role built in — info, success, warning,
   or error — announced properly by screen readers and never relying on color alone.
 *   Table of Contents A table of contents generated from the page's real heading
   outline on every view — reorder your sections and it stays correct, automatically.
 *   Accessible Button A call-to-action button whose colors are always WCAG-safe:
   pick a background from your theme palette and the most readable text color is
   chosen for you — re-checked on every page view.
 *   Card Grid A responsive grid of cards. Columns adapt to the available space 
   automatically — no breakpoints to configure, nothing to break.
 *   Accessible Section A content section that manages heading structure for you:
   any Accessible Heading inside renders at the correct level based on how sections
   are nested — reordering can never break your document outline.
 *   Accessible Accordion Expandable content panels with correct disclosure semantics
   and full keyboard support built in — Enter/Space to toggle, arrow keys to move
   between headers, screen-reader announcements for free.
 *   Card One card in a Card Grid. Its title is an Accessible Heading, so card titles
   automatically join the page outline at the correct level.
 *   Accordion Item One expandable panel inside an Accessible Accordion. The header
   is a real button inside a correctly-leveled heading; the panel is a labeled region.

## FAQ

### Does this replace core blocks?

No. ItÌtumọ̀ Yorùbá: ’s a focused set that mixes freely with core blocks — use core
paragraphs, images, and columns as usual. The Outline Checker even watches headings
you author with the core Heading block.

### What happens to an uncolored button?

It inherits your themeÌtumọ̀ Yorùbá: ’s own button styling (the same `wp-element-
button` mechanism coreÌtumọ̀ Yorùbá: ’s Button uses), so it always looks like a 
button. The contrast guarantee applies the moment you pick a palette background;
the theme-default stateÌtumọ̀ Yorùbá: ’s contrast is the themeÌtumọ̀ Yorùbá: ’s 
responsibility, exactly as with core buttons.

### My theme defines palette colors as CSS variables — does the contrast check work?

Yes. Palettes in the `var(--name, #hex)` format used by many popular themes are 
fully supported. A color whose value genuinely canÌtumọ̀ Yorùbá: ’t be resolved (
for example `color-mix(...)`) is not offered for buttons rather than being silently
unchecked, and the sidebar explains why.

### Why canÌtumọ̀ Yorùbá: ’t I pick a heading level?

ThatÌtumọ̀ Yorùbá: ’s the point: hand-picked levels are how outlines break. The 
level always derives from section nesting, so reordering can never skip a level 
or create a second H1. If you need a specific level, nest (or un-nest) the section—
the outline follows the structure.

### What happens if I deactivate the plugin?

Static content (sections, cards, notices’ inner content) remains as clean HTML. 
Dynamic blocks (headings, buttons, accordions, table of contents) stop rendering
their markup but your content is preserved and reappears on reactivation — nothing
is lost.

### Does it phone home?

No. Zero external HTTP requests, no tracking, no accounts.

## Àwọn àgbéyẹ̀wò

Kò sí àwọn àgbéyẹ̀wò fún plugin yìí.

## Àwọn Olùkópa & Olùgbéejáde

“Guardrail Blocks” jẹ́ ètò ìṣàmúlò orísun ṣíṣí sílẹ̀. Àwọn ènìyàn wọ̀nyí ti ṣe ìkópa
sí plugin yìí.

Àwọn Olùkópa

 *   [ BreonWilliams ](https://profiles.wordpress.org/breonwilliams/)

[Túmọ̀ “Guardrail Blocks” sí èdè rẹ.](https://translate.wordpress.org/projects/wp-plugins/guardrail-blocks)

### Ṣe o nífẹ̀ẹ́ sí ìdàgbàsókè?

[Ṣàwárí koodu](https://plugins.trac.wordpress.org/browser/guardrail-blocks/), ṣàyẹ̀wò
[ibi ìpamọ́ SVN](https://plugins.svn.wordpress.org/guardrail-blocks/), tàbí ṣe àgbékalẹ̀
sí [àkọsílẹ̀ ìdàgbàsókè](https://plugins.trac.wordpress.org/log/guardrail-blocks/)
nípasẹ̀ [RSS](https://plugins.trac.wordpress.org/log/guardrail-blocks/?limit=100&mode=stop_on_copy&format=rss).

## Àkọsílẹ̀ àwọn àyípadà

#### 0.1.1

 * Heading levels are now also derived from the block treeÌtumọ̀ Yorùbá: ’s actual
   nesting on every render, so a stored level can never produce a wrong heading —
   the outline guarantee is enforced server-side end to end.
 * New theme-friendly design controls via core block supports: border on Card and
   Accordion; border radius on Button and Media Figure (rounds the image); padding
   on Accordion; font size on Accordion, Notice, and Table of Contents; margin on
   Accessible Heading.
 * Fixed: the ButtonÌtumọ̀ Yorùbá: ’s border radius now previews live in the editor
   with themes that style `wp-element-button` (Blocksy and similar).

#### 0.1.0

 * Initial release.
 * Blocks: Accessible Section, Accessible Heading, Accessible Button, Card + Card
   Grid, Accessible Accordion, Notice, Media Figure, Table of Contents.
 * Contrast engine (editor + server) with support for hex, rgb(), and var()-fallback
   theme palettes.
 * Heading levels derived from section nesting with self-correction on reorder; 
   Outline Checker panel.
 * Accordion built on the WordPress Interactivity API with the WAI-ARIA disclosure
   pattern.
 * Five patterns including the Starter Brochure Page.

## Àkójọpọ̀ Meta

 *  Ẹ̀yà **0.1.1**
 *  Ìgbàgbọ́hùn tó kẹ́yìn **ọ̀sẹ̀ 3 sẹ́yìn**
 *  Àwọn ìgbéwọlẹ̀ tó ṣiṣẹ́ **Tó kéré sí 10**
 *  Ẹ̀yà WordPress ** 6.9 tàbí ju bẹ́ẹ̀ lọ **
 *  Dánwò dé **7.0.2**
 *  Ẹ̀yà PHP ** 8.0 tàbí ju bẹ́ẹ̀ lọ **
 *  Èdè
 * [English (US)](https://wordpress.org/plugins/guardrail-blocks/)
 * Àwọn àmì
 * [accessibility](https://yor.wordpress.org/plugins/tags/accessibility/)[blocks](https://yor.wordpress.org/plugins/tags/blocks/)
   [contrast](https://yor.wordpress.org/plugins/tags/contrast/)[headings](https://yor.wordpress.org/plugins/tags/headings/)
   [wcag](https://yor.wordpress.org/plugins/tags/wcag/)
 *  [Ìwòye Tó Péye](https://yor.wordpress.org/plugins/guardrail-blocks/advanced/)

## Àwọn ìbò

Kò sí ìwádìí tí a tíì fi ránṣẹ́.

[Your review](https://wordpress.org/support/plugin/guardrail-blocks/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/guardrail-blocks/reviews/)

## Àwọn Olùkópa

 *   [ BreonWilliams ](https://profiles.wordpress.org/breonwilliams/)

## Ìrànlọ́wọ́

Nǹkan wà tí o fẹ́ sọ? Ṣé o nílò ìrànlọ́wọ́?

 [Wo àpéjọ ìrànlọ́wọ́](https://wordpress.org/support/plugin/guardrail-blocks/)