Skip to content

fix(pull-request-hotkeys): support renamed aria-label and fix arrow-key navigation - #10008

Closed
mu88 wants to merge 1 commit into
refined-github:mainfrom
mu88:feature/ai-fix-pull-request-hotkeys-selector
Closed

fix(pull-request-hotkeys): support renamed aria-label and fix arrow-key navigation#10008
mu88 wants to merge 1 commit into
refined-github:mainfrom
mu88:feature/ai-fix-pull-request-hotkeys-selector

Conversation

@mu88

@mu88 mu88 commented Aug 28, 2026

Copy link
Copy Markdown

Description

GitHub renamed the PR tab-nav's aria-label again (now "Pull request navigation" on the Conversation/Commits sub-pages, while /files still uses the old "Pull request tabs"), which broke tab detection and threw ElementNotFoundError in the console.

While fixing that, I also found that g Left / g Right navigated to the wrong tab. The previous code combined g <number> and g Arrow* on the same tab link via a comma-separated data-hotkey value (e.g. "g 1,g ArrowLeft"). This is the only place in the codebase using that pattern, and GitHub's native hotkey handler doesn't reliably resolve multiple g-prefixed sequences sharing one element. Registering the previous/next hotkeys on dedicated hidden elements (via the existing registerHotkey helper) fixes it.

How to replicate the issue + URL

#9916

  1. Open a PR with more than one tab.
  2. Note the console error ElementNotFoundError and that g <number> hotkeys silently stop working.
  3. Navigate to a middle tab (e.g. Commits) and press g Left / g Right - it lands on the wrong tab instead of the adjacent one.

Testing

Manually tested on both the linked public PR and an internal company repository:

  • g 1-g 4 jump to the correct tab.
  • g Left / g Right cycle correctly through all tabs in both directions, including wraparound (last <-> first).

Recording attached below (keystrokes shown for each navigation step):
2026-08-28_11h44_03

Fixes #10006

…ey navigation

GitHub renamed the PR tab-nav's aria-label again (now "Pull request
navigation" on the Conversation/Commits sub-pages, while /files still uses
the old "Pull request tabs"), which broke tab detection.

The arrow-key hotkeys (g Left/g Right) also navigated to the wrong tab,
because they were combined with the tab's own `g <number>` hotkey on the
same element via a comma-separated data-hotkey value. GitHub's native
hotkey handler doesn't reliably resolve multiple g-prefixed sequences
sharing one element, so the previous/next hotkeys are now registered on
dedicated hidden elements instead.

Fixes refined-github#10006

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot closed this Aug 28, 2026
@github-actions github-actions Bot added the bug label Aug 28, 2026
@github-actions

Copy link
Copy Markdown

This looks like an AI-generated PR, so we're preemptively closing it. If you're human and tested it, include a screenshot/video/gif of the working PR and we can reopen the PR. Don't open more PRs until this one is resolved.

@github-actions github-actions Bot changed the title fix(pull-request-hotkeys): support renamed aria-label and fix arrow-key navigation fix(pull-request-hotkeys): support renamed aria-label and fix arrow-key navigation Aug 28, 2026
@mu88

mu88 commented Aug 28, 2026

Copy link
Copy Markdown
Author

@fregante: I tested it manually and added a screen recording

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

Labels

Development

Successfully merging this pull request may close these issues.

pull-request-hotkeys broken again in v26.8.8 — GitHub renamed tab-nav aria-label

2 participants