---
title: "Creating an accessible search experience with the QueryBuilder component"
description: "GitHub's QueryBuilder is a combobox-based search input built to stay accessible while supporting per-character styling, suggestions with different actions, and grouped results."
url: "https://swe.quest/articles/creating-an-accessible-search-experience-with-the-querybuilder-component-ffcb7d20ca7f5c3b"
canonical: "https://github.blog/engineering/user-experience/creating-an-accessible-search-experience-with-the-querybuilder-component/"
source: "GitHub Engineering"
published: "2022-12-13"
difficulty: "medium"
kind: "Case study"
reading_minutes: 9
tags: ["accessibility","frontend","design-systems","search"]
---

# Creating an accessible search experience with the QueryBuilder component

A post on [GitHub Engineering](https://swe.quest/sources/github.md), published 2022-12-13, 9 min read, Case study. Original: [https://github.blog/engineering/user-experience/creating-an-accessible-search-experience-with-the-querybuilder-component/](https://github.blog/engineering/user-experience/creating-an-accessible-search-experience-with-the-querybuilder-component/)

## Summary

GitHub'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 &nbsp; 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.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Accessibility](https://swe.quest/tags/accessibility.md) (Web & mobile)
- [Frontend](https://swe.quest/tags/frontend.md) (Web & mobile)
- [Design systems](https://swe.quest/tags/design-systems.md) (Web & mobile)
- [Search](https://swe.quest/tags/search.md) (Backend & APIs)

## Prerequisites

- HTML semantics
- ARIA attributes
- Screen reader basics

## Keywords

QueryBuilder, Primer, ARIA, Combobox pattern, aria-live, Web Components, GitHub Discussions

## Related posts

- [Accessibility considerations behind code search and code view](https://swe.quest/articles/accessibility-considerations-behind-code-search-and-code-view-4501ed426b29574e.md): GitHub Engineering · 2023-07-06 · Medium · 10 min read · Accessibility, Frontend, Browsers, Design systems
  GitHub rebuilt code search and code view to remove accessibility barriers that pushed screen reader users toward raw files.
- [Building a more accessible GitHub CLI](https://swe.quest/articles/building-a-more-accessible-github-cli-b16ba0e7481d923f.md): GitHub Engineering · 2025-05-02 · Easy · 6 min read · Accessibility, Developer tools
  GitHub 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.
- [Considerations for making a tree view component accessible](https://swe.quest/articles/considerations-for-making-a-tree-view-component-accessible-d55d10f05de5e995.md): GitHub Engineering · 2025-01-28 · Medium · 10 min read · Accessibility, Frontend, Design systems
  GitHub's accessible file tree models Windows File Explorer's tree view behavior, since that is what many desktop screen reader users already know.
- [Exploring the challenges in creating an accessible sortable list (drag-and-drop)](https://swe.quest/articles/exploring-the-challenges-in-creating-an-accessible-sortable-list-drag-and-drop-94e021953e35b2e4.md): GitHub Engineering · 2024-07-09 · Medium · 7 min read · Accessibility, Frontend, Browsers
  Building 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.
- [A conversation with Figma's accessibility team](https://swe.quest/articles/a-conversation-with-figma-s-accessibility-team-4d7c0aee064f1f20.md): Figma · 2022-11-17 · Easy · 9 min read · Accessibility, Frontend
  Figma's accessibility engineers and PM reflect on shipping screen reader support for prototypes and a FigJam beta.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
