Accessibility considerations behind code search and code view
GitHub 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.
Related posts
- Crafting a better, faster code view
GitHub Engineering mediumAdeptGitHub's new React-based code view renders an 18,000-line file in under a second instead of nearly 27 seconds. Lines outside the viewport are virtualized away, while an invisible textarea holds the full raw text so native Ctrl+F, keyboard navigation and screen readers keep working. A custom find-in-file was dropped after beta users and assistive-technology needs favoured the browser's native find. The visible syntax-highlighted overlay is hidden from find by injecting each character through CSS :before pseudoelements. Switching the highlighter to emit offset/class ranges and building HTML strings outside React cut a jump-to-end scroll from about 4.5s to about 0.8s of main-thread work.
- Considerations for making a tree view component accessible
GitHub Engineering mediumAdeptGitHub'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.
- Building a more accessible GitHub CLI
GitHub Engineering easyNoviceGitHub CLI's Public Preview (v2.72.0, enabled via `gh a11y`) adapts accessibility practice to the terminal, where no WCAG-equivalent standard exists and screen readers must infer structure from a plain character grid. Interactive prompts were rebuilt on Charm's `huh` library so speech synthesis screen readers read them correctly. The redraw-based braille spinner was replaced with a static, context-specific text progress indicator. Markdown colors were realigned to the 16-color ANSI 4-bit palette, informed by Primer, so users can keep contrast against any terminal background and customize hues through their terminal settings. Planned work includes extending these features to CLI extensions and screen-reader-friendly table formatting.
- 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.
- 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.