fix(template): stop rendering the sort dropdown in its opened state - #1584
Closed
culfin wants to merge 1 commit into
Closed
fix(template): stop rendering the sort dropdown in its opened state#1584culfin wants to merge 1 commit into
culfin wants to merge 1 commit into
Conversation
sort-btns.html carries the DOM of an opened dropdown: \`class="show"\` on the group, the toggle and the menu, \`aria-expanded="true"\`, and the inline coordinates Popper had written when that markup was captured. Without the interface — which is exactly the situation the template exists for — the menu therefore stands open on top of the page, and assistive technology is told a collapsed control is expanded. The same file also holds a captured React identifier, \`id="react-aria8245013726-:r5:"\`, referenced by an \`aria-labelledby\`. It is replaced by a stable name. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ui/template/sort-btns.htmlcarries the DOM of an opened dropdown:class="show"sits on the group, the toggle and the menu;aria-expandedsaystrue; and the inline style is the position Popper had computed at the momentthat markup was captured.
Without the React interface — the situation the template exists for — the menu
stands open across the page, and assistive technology is told that a collapsed
control is expanded.
The same file holds a captured React identifier as well:
It works, but it is not a name anyone chose, and the colons make it awkward to
address from CSS. Replaced with
question-layout-toggle.How it was found
Building a site that shows the server-rendered pages to visitors rather than
only to crawlers. Until the interface loads, "Score" hangs over the question
list.
🤖 Generated with Claude Code