Declarative A11y Protocol

The Figma Layer Tree Is the Accessibility Spec

Declarative A11y Protocol headline image
  • Accessibility
  • Design Systems
  • X-Func

Methodology · Date: ~2025 · Developed during client engagements

This case focuses on an a11y handoff protocol approach — a reusable technique and methodology.
General accessibility handoff relies on documentation and manual redlining — slow to write and read, often cut under deadline pressure. I developed a lightweight alternative: a declarative protocol where the Figma layer tree become a part of accessibility spec. Much less document required for the vast majority of cases.

The Problem

Accessibility Documentation Doesn't Scale Under Deadline Pressure

Accessibility handoff relies on a designer redlining a screen with a long spec doc covering touch targets, contrast, tab order, and ARIA roles. It's slow, and often the first thing that gets cut when a deadline tightens.

Why I Built This

On one consulting (client under NDA) engagement, accessibility hadn't been considered at all — the existing product line had zero compliance, which was a real legal risk given planned expansion into new markets. Leadership was hesitant to invest in it: cost, scope, and engineering time were all concerns, and the instinct was to ship first and retrofit accessibility later.
I've seen that pattern before, and it almost always means accessibility never actually gets retrofitted. My argument: accessibility is cheapest when it's built into the design from day one, and the real blocker usually isn't the design work itself — it's the handoff overhead. So I set out to remove that overhead entirely.

The Protocol

Four Symbols, One Source of Truth

Instead of writing a separate specification document, I defined a small, consistent notation that lives directly in Figma layer names. If a designer names and orders layers according to the protocol, the accessibility structure is already fully specified — an engineer can read it straight off the layer panel.

The Notation

**`*` (prefix)** — marks a touch target. Forces a 44×44px minimum tap area; an engineer reads the frame size directly off the layer.
**`[...]` (tag)** — defines a semantic role, e.g. `[btn]`, `[switch]`, `[h1]`–`[h6]`. Maps directly to a component prop or an ARIA role.
**`{...}` (variable)** — marks a dynamic value, used for an `aria-label` or a content-binding path.
**`[modal]` (tag)** — declares a focus-trap container. On open: lock focus inside and apply `aria-modal="true"`. On close: restore focus to whatever triggered it. One of the more error-prone accessibility patterns, handled the same declarative way as everything else.
**Layer order (top-to-bottom)** — defines the single keyboard-tab / screen-reader-swipe navigation path. As long as a designer doesn't arbitrarily reorder layers, engineering gets the navigation path for free by just following the layer tree.
The layer tree, annotated — this single view is the entire spec.: The Protocol - showcase image
The layer tree, annotated — this single view is the entire spec.

What It Deliberately Doesn't Cover

This notation handles roughly 95% of cases, not all of them. It doesn't express active announcements (e.g. a non-action-triggered "device disconnected" toast needing `aria-live` priority), custom gesture alternatives, or cross-layer associations (like `aria-describedby` when explanatory text is scattered across the screen). Those still need a short explicit note — the protocol is meant to eliminate 95% of the documentation burden, not all of it.

Validation

Proving It to Engineering Before Asking Them to Trust It

A new handoff convention is only useful if engineering actually adopts it — and that requires proof, not just a specification document.

Rather than presenting the protocol as a theory, I built one high-fidelity prototype of the most complex interactive flow in the product — the kind with dynamic focus transitions and a modal focus trap — and worked through it directly with the engineering lead. The exercise showed that mirroring the Figma layer tree exactly reproduced the correct behavior automatically, with no additional documentation needed beyond the one-page protocol itself.
That single validation session did more to build trust in the approach than any amount of written specification would have.
An article image: Validation - showcase image

Result & Reflection

Low Training, Zero Technical Debt
The engineering team shipped a complete accessibility foundation on the original MVP timeline — no extra training, no lengthy documentation to maintain, and no technical debt to retrofit later. Beyond the immediate project, this reframed accessibility from "a compliance cost to negotiate down" into "a structural upgrade that's nearly free if you build it in from day one."
I now treat this protocol as a reusable tool, not a one-off trick for a single engagement — the same four-symbol notation applies to any Figma-to-engineering handoff, regardless of the product or platform.
What accessibility documentation used to take, versus what this protocol replaced it with.: Result & Reflection - showcase image
What accessibility documentation used to take, versus what this protocol replaced it with.