Skip to content

[spike] Tabbed SelectPanel with correct ARIA on the stable API (forced rebuild)#7970

Draft
joshfarrant wants to merge 3 commits into
mainfrom
joshfarrant/selectpanel-today-stable-correct
Draft

[spike] Tabbed SelectPanel with correct ARIA on the stable API (forced rebuild)#7970
joshfarrant wants to merge 3 commits into
mainfrom
joshfarrant/selectpanel-today-stable-correct

Conversation

@joshfarrant

@joshfarrant joshfarrant commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Draft — not for merge. Part of a spike comparing how a tabbed SelectPanel (Branches / Tags, one shared search) gets built across Primer's APIs. Same task, same model (Opus 4.8); the API is the only variable:


Same task on the stable SelectPanel, but with ARIA correctness made non-negotiable (a real tab→tabpanel→listbox relationship). The agent abandoned the stable SelectPanel entirely — it can't express this — and rebuilt the overlay/listbox/combobox/tabs on lower-level primitives (AnchoredOverlay, useFocusZone): ~282 lines, ~40% of it re-implemented SelectPanel internals.

See packages/react/src/SelectPanel/examples/RefPickerV1Correct.tsx. This shows what correctness costs on the closed API: the component contributes essentially nothing.

Adds RefPickerV1Correct, a reusable git-ref picker: a button opening an
anchored panel with two tabs (Branches/Tags), one shared search input that
filters the active tab's list, per-tab result counts, and single selection.

The stable SelectPanel renders a fixed internal layout (header -> notice ->
internally-owned FilteredActionList) with no content slot and an internally
generated listbox id, so a correct APG tab -> tabpanel -> listbox association
cannot be wired through its closed API. This component is therefore built on
the public AnchoredOverlay primitive + useFocusZone, re-implementing the
overlay content, shared filter input, listbox and its focus management.

ARIA: tab(aria-controls=panel) -> tabpanel(aria-labelledby=tab) -> listbox
(aria-labelledby=tab) -> option(aria-selected); the shared combobox input's
aria-controls points at the active listbox with focus-zone-managed
aria-activedescendant.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@changeset-bot

changeset-bot Bot commented Jun 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e98a441

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions Bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Jun 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Action required

👋 Hi, this pull request contains changes to the source code that github/github-ui depends on. If you are GitHub staff, test these changes with github/github-ui using the integration workflow. Check the integration testing docs for step-by-step instructions. Or, apply the integration-tests: skipped manually label to skip these checks.

To publish a canary release for integration testing, apply the Canary Release label to this PR.

@primer

primer Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

🤖 Lint issues have been automatically fixed and committed to this PR.

@github-actions github-actions Bot requested a deployment to storybook-preview-7970 June 10, 2026 14:25 Abandoned
@primer

primer Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

🤖 Lint and formatting issues have been automatically fixed and committed to this PR.

@github-actions github-actions Bot requested a deployment to storybook-preview-7970 June 10, 2026 14:32 Abandoned
@primer

primer Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

🤖 Lint issues have been automatically fixed and committed to this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant