Repository navigation
Description
Hidden content is not searchable
Content inside collapsed dropdowns is not searchable using browser-native search (cmd+f / ctrl+f). This negatively impacts usability, especially on pages with long lists of items hidden in dropdowns because users are unable to easily find the content they are looking for.
For example: https://www.elastic.co/docs/reference/query-languages/esql/esql-functions-operators
Using cmd+f to search for a specific function name does not work unless the dropdown containing that content is already expanded.
Proposal:
Ensure dropdown content is discoverable via browser search. Possible approaches:
- Render all dropdown content in the DOM by default (even if visually collapsed)
- Use accessible disclosure patterns (e.g., /
tags)
- Explore JavaScript solutions that temporarily expand all dropdowns during a search
Dropdowns all collapsed by default
When a user lands on a page with multiple dropdowns, all sections are collapsed. This makes it unclear that the page contains expandable sections and can lead to confusion or missed content.
Proposal:
Automatically expand the first dropdown section on page load. This provides a visual cue that other sections can be expanded, helping users understand the interaction model of the page.
Activity
KOTungseth commentedon May 14, 2026
This is coming up again on the Known issues pages.
cotti commentedon Jun 3, 2026
AI triage
Automated investigation against the current codebase. A human still needs to confirm before any code change.
Original concern
The
{dropdown}directive bundles two reader-experience requests: collapsed dropdown content can't be found with browser-native search (cmd/ctrl+F), and pages full of collapsed dropdowns give no visual cue that sections are expandable (proposal: auto-expand the first one).Findings
src/Elastic.Markdown/Myst/Directives/Dropdown/DropdownView.cshtml:3-37— the directive already renders as a native<details>/<summary>(one of the proposal's suggested "accessible disclosure" approaches). Content sits in the DOM but is hidden while collapsed.src/Elastic.Markdown/Myst/Directives/DirectiveHtmlRenderer.cs:352&:369—Open = block.DropdownOpen.GetValueOrDefault() ? "open" : null, so a dropdown is collapsed unless the author opts in.src/Elastic.Markdown/Myst/Directives/Admonition/AdmonitionBlock.cs:42-44exposes that per-dropdown:open:option;docs/syntax/dropdowns.md:3confirms "By default, dropdowns are collapsed." There is no auto-expand-first behavior.<details>is browser-dependent: Chromium (Chrome/Edge ≥120) auto-expands<details>during find-in-page, so concern Configure Renovate #1 already works there; Firefox/Safari do not. The repo is aware of the gap —src/Elastic.Documentation.Site/Assets/open-details-with-anchor.ts:6-22force-opens<details>on anchor navigation specifically for non-Chrome browsers.src/Elastic.Documentation.Site/Assets/api-docs.ts:7-8and:141-167usehidden="until-found"+beforematch(CSS atsrc/Elastic.Documentation.Site/Assets/api-docs.css:381-393). The{dropdown}directive does not reuse it — and note it is also Chromium-gated viaonbeforematch, so it would not help Firefox/Safari either.src/Elastic.Documentation.Site/Assets/main.ts:110-124— thehtmx:loadinit path wiresopenDetailsWithAnchor()andinitApiDocs(), but nothing expands a page's first dropdown or expands all dropdowns during a search.Verdict
Needs stakeholder input
Neither requested behavior is implemented as asked, and both hinge on design decisions rather than a mechanical change. The
<details>migration already gives Chromium-native find-in-page (partial mitigation of concern #1), but cross-browser searchability has no in-repo solution — the existinghidden="until-found"pattern is itself Chromium-only, so making Firefox/Safari work would require deciding on (and building) a real expand-on-search mechanism. The "auto-expand the first dropdown" idea is a pure interaction-design call with non-obvious downsides (pages like the ES|QL functions reference or the Kibana known-issues page may have a long or non-meaningful first entry). This is a vague catch-all worth splitting once scope is agreed.Proposal
Open questions, grouped by audience:
{dropdown}usage site-wide?<details>find-expand norhidden="until-found"works in Firefox/Safari, is a cross-browser expand-on-search even feasible (e.g. a JS hook on cmd/ctrl+F that force-opens every<details>), and is that worth the complexity vs. accepting Chromium-only? If "auto-expand first" wins, it would be a small addition either inDirectiveHtmlRenderer.WriteDropdown/AdmonitionBlock(first-in-page detection) or a one-liner inmain.ts.Related issues
{dropdown}directives. Already triagedai:ux-question; a coherent "expand/collapse all" answer could cover both surfaces.<details>component, adjacent concern (anchor-into-dropdown), partly handled byopen-details-with-anchor.ts.Notes