Considerations for making a tree view component accessible
GitHub's accessible file tree models Windows File Explorer's tree view behavior, since that is what many desktop screen reader users already know. It is built on nested ul/li semantics, which help with less common assistive tech and Forced Color Mode. ARIA tree, treeitem and group roles are layered on top, along with a roving tabindex inside a single-tab-stop composite widget wrapped in a nav landmark. Roving tabindex was chosen because aria-activedescendant failed with VoiceOver. Interoperability fixes include explicit aria-level on each node, aria-labelledby for accessible names that VoiceOver otherwise missed, live-region announcements and focus management for loading states, and JavaScript to replicate middle-click link behavior.
Related posts
- Accessibility considerations behind code search and code view
GitHub Engineering mediumAdeptGitHub rebuilt code search and code view to remove accessibility barriers that pushed screen reader users toward raw files. After a sort change triggers a full page navigation, focus is restored to the sort dropdown. After a search, focus moves to the results-count header instead of using aria-live announcements, which race with page-title announcements. The file tree became the open-source TreeView component, with typeahead and strict ARIA markup. Code reading uses a hidden <textarea> modeled on Monaco, layered under syntax-highlighted virtualized lines with a synced fake cursor. That design enables native screen reader navigation, find and select-all, but brings costs: scroll syncing, cross-browser quirks, and Firefox text-zoom mismatches.
- Exploring the challenges in creating an accessible sortable list (drag-and-drop)
GitHub Engineering mediumAdeptBuilding a keyboard-, screen-reader- and voice-control-accessible sortable list surfaced several non-obvious pitfalls, each with a concrete fix. role='application' is applied only to the drag trigger and only while dragging, so arrow keys can be reassigned without breaking screen reader navigation. Keyboard and mouse handling are split across a visible icon button and an invisible overlay because NVDA simulates mouse events on Enter/Space. Position announcements use a 100ms debounce with assertive aria-live to stop stale updates during rapid moves, and a form-based move dialog sidesteps voice control's scroll-and-drop problem; several non-voice-control users ended up preferring that dialog too.
- Building accessibility into a canvas-based product
Figma mediumAdept
Because Figma renders its canvas itself rather than through HTML, the browser's accessibility tree is nearly empty, so Figma rebuilt accessibility with a hidden but laid-out "Mirror DOM" synced to the scenegraph. It rests on four pieces: an incrementally updated internal accessibility tree of per-layer accessible summaries, a recursive React component that renders ARIA-labelled elements positioned via concatenated affine transforms, two-way sync between canvas selection and keyboard focus, and ARIA live-region announcements that merge repeated events like nudges into one message. Mirror DOM elements are deliberately not visually-hidden, so magnifiers, focus outlines and voice control still get correct spatial positions.
- 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.
- Creating an accessible search experience with the QueryBuilder component
GitHub Engineering mediumAdeptGitHub's QueryBuilder is a combobox-based search input built to stay accessible while supporting per-character styling, suggestions with different actions, and grouped results. Styling uses an aria-hidden div of spans aligned behind a real input whose text is transparent, avoiding contenteditable. Group membership and "jump to" behavior are conveyed through aria-labels that begin with the visible text (for voice control users), since role="group" inside listbox is poorly supported. An aria-live region announces result counts, and a toggled forces re-announcement when the message is unchanged. The component is built as a Web Component to be open-sourced in Primer React and ViewComponents.