Skip to content

fix(template): stop rendering the sort dropdown in its opened state - #1584

Closed
culfin wants to merge 1 commit into
apache:mainfrom
Besser-Sehen-Landshut:fix/ssr-sort-dropdown-open
Closed

fix(template): stop rendering the sort dropdown in its opened state#1584
culfin wants to merge 1 commit into
apache:mainfrom
Besser-Sehen-Landshut:fix/ssr-sort-dropdown-open

Conversation

@culfin

@culfin culfin commented Aug 24, 2026

Copy link
Copy Markdown

ui/template/sort-btns.html carries the DOM of an opened dropdown:

<div role="group" class="show dropdown btn-group">
  <button type="button" aria-expanded="true" class="dropdown-toggle show btn …">
  <div x-placement="bottom-start" class="dropdown-menu show"
       data-popper-reference-hidden="false" data-popper-escaped="false"
       data-popper-placement="bottom-start"
       style="position: absolute; inset: 0px auto auto 0px; transform: translate(0px, 33px);">

class="show" sits on the group, the toggle and the menu; aria-expanded says
true; and the inline style is the position Popper had computed at the moment
that 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:

<button type="button" id="react-aria8245013726-:r5:" >
<div  aria-labelledby="react-aria8245013726-:r5:" >

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

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>
@culfin

culfin commented Aug 24, 2026

Copy link
Copy Markdown
Author

Folded into #1592 together with the other three defects in ui/template/ — one pull request is easier to review than four, and none of them is more than a line or two. Nothing is dropped, and the new one also targets dev as requested in #1572. Closing to keep the queue readable.

@culfin culfin closed this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant