Design system annotations, part 2: Advanced methods of annotating components
Design system teams can build their own "Preset annotations": Figma annotation components that carry accessibility details not conveyed visually, in component properties, or in code. GitHub picked ten Primer components using usage data from its Primer Query tool, audit frequency, React availability and org priorities. It then mapped the missing properties by cross-referencing Primer docs, Storybook demos, Figma asset properties, team experience and audit findings. Presets help newer teams most but need ongoing maintenance as components change, and the property mapping is groundwork for automated annotation. Figma Code Connect with hidden layers (e.g. an aria-label text property on IconButton) can bypass annotations entirely, with tips on consistency, branching and visual regression testing.
Related posts
- Design system annotations, part 1: How accessibility gets left out of components
GitHub Engineering mediumAdeptAccessible design system components don't guarantee accessible designs: heading hierarchies break when components are composed, alt text and labels depend on context, and Figma components can't convey implementation details like link-vs-button or form submission. GitHub's Accessibility Design team built Preset annotations for ten frequently used Primer components in its open-sourced Figma Annotation Toolkit. Designers annotate only the per-instance details, such as accordion heading levels, while everything already built into the component is skipped, and each preset links to component docs and Storybook demos.
- The shared language of props
Figma mediumAdept
Figma component properties and codebase component props share names but serve different purposes: design props mark visual differences, while code props also carry behaviour, events and data. A case study from a React/TypeScript app built on Material UI shows two Figma button components mapping to five code components layered over a ButtonPrimitive, which used types to make aria-label required for icon-only buttons. The practical advice is to align variant names and casing where possible, mark Figma-only concepts like interaction state with a prefix such as ":state", and accept differences like disabled being a boolean prop in code.
- Unlocking inclusive design: how Primer’s color system is making GitHub.com more inclusive
GitHub Engineering mediumAdeptGitHub's Primer design system fixed hundreds of color contrast violations across light and dark modes and all themes by changing its foundational color tokens (Primer Primitives) rather than individual components. The team audited 100+ text/background color pairs against WCAG ratios (4.5:1 and 3:1) and wrote a script that checks every pair across every theme. The script handles semi-transparent colors by first blending the background onto the page background, then blending the text onto that result. The check now runs as a GitHub Action on every Primer pull request, and the changes were rolled out to staff behind a feature flag before going live.
- The making of the Figma Pattern Library
Figma mediumAdept
Figma rebuilt its fragmented internal design system as the Figma Pattern Library (FPL) ahead of the UI3 redesign, with a small team of designers and engineers working in a paired style. Color tokens moved out of a Google Sheet into Figma variables: primitive color ramps are aliased by semantic variables that have modes for light/dark themes and for each product. A GitHub Action uses the REST API to open pull requests that sync published variable changes into code tokens. Every component must have Code Connect support before it counts as done, which maps design components to code even when their structures differ. After five months the library had 680+ tokens and 22 component sets with 670+ variants.
- A conversation with Figma's accessibility team
Figma easyNovice
Figma's accessibility engineers and PM reflect on shipping screen reader support for prototypes and a FigJam beta. Open-beta feedback showed the feature worked in VoiceOver but needed fixes for JAWS and NVDA. Low-vision users also rely on visuals alongside the screen reader, so the team added positioning data to the accessibility tree, focus-triggered hover interactions, scroll-following, and focus-aware toolbar hiding. For FigJam, designs are translated into HTML with accessibility metadata, and reading order now uses a spatial heuristic that reads left-to-right and top-to-bottom while keeping sticky clusters together, borrowed from find-and-replace. Open problems include announcing real-time collaborative changes and giving designers control over the generated semantic HTML.