Skip to content

useful-not-found-page - Fix the selector after the 2026 blank slate redesign - #10136

Draft
nanami-0713 wants to merge 1 commit into
refined-github:mainfrom
nanami-0713:fix/useful-not-found-page-blankslate
Draft

nanami-0713 wants to merge 1 commit into
refined-github:mainfrom
nanami-0713:fix/useful-not-found-page-blankslate

Conversation

@nanami-0713

Copy link
Copy Markdown

Description

GitHub's redesigned 404 blank slate dropped the go to Overview / go to default branch aria-labels, so both legacy selectors in useful-not-found-page.css stopped matching and the buttons are visible again (#10133).

The new selector anchors on the stable error-404-description test id (the 410 variant's eror- typo is kept, as observed in the feature's own selector list) and hides the blank slate's primary action, reusing the .Blankslate-Action > a:only-child pattern already present for the 301-file rule.

Verified against the live DOM of both variants (logged-out fetch + rendered page): the old selectors match 0 elements, the new one matches exactly the one button on each page, and display: none applies after injection.

Test URLs

Screenshot

Missing branch, before / after:

Before After

Missing file, before / after:

Before After

(Screenshots taken by injecting the exact CSS rule of this PR into the live pages listed above.)

Closes #10133

@github-actions github-actions Bot added the bug label Sep 27, 2026
@fregante

Copy link
Copy Markdown
Member

Thanks for the PR. Actually this is best done in the init function after mounting the widget:

function addWidget(container: HTMLElement): void {

The reason is that :has() selectors are very heavy so we avoid where possible. The CSS should stay unchanged, it's already slate for removal in 2027

@fregante
fregante marked this pull request as draft September 29, 2026 11:07

This branch has not been deployed

No deployments
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.

useful-not-found-page not hiding "go to default branch" button

2 participants