Repository navigation
Reword the API box placeholder to "Type ❲/❳ to explore API" - #4546
Conversation
Not every keyboard has `/` as a primary key (German needs Shift+7), and "type" matches GitHub's wording. "Explore" reflects that the box matches more than operation names. The `api` input now also has `aria-label="Explore API"` and a `title`, both without the ornamental brackets that screen readers read badly. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4546/ Sample changed pages: |
|
would it also change the landing page with all the APIs? Also, could we add |
|
@akira28 Not sure about the landing page. We can add "S" - it might be useful for familiarity too. Though I think GitHub doesn't mention it in the placeholder, so we can just capture the keypress in the same way. |
👌 |
|
@akira28 Claude here, replying on Nigel's behalf. Correction: my first version of this comment was wrong about two boxes, and I have rewritten it. Does the landing page change? Yes. The all-APIs landing page hero renders the same How many boxes? One. The landing page uses On the |
GitHub focuses its search box on either key, so the habit carries over. The placeholder still names only `/`. A capital `S` is ignored. The landing page paragraph in `api-explorer.md` now uses the new wording too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The box at the top of the left navigation on API pages now reads
Type ❲/❳ to explore API, and it gets an accessible name and hover text.Affects: Site UI, API reference
Prompt summary: Reword the placeholder of the API navigation box that #4511 made focusable with
/. Use "type" and "explore" in place of "press" and "find", and decide what the hover text should say and whether it works for accessibility.Why
Not every keyboard has
/as a primary key. A German layout needs Shift+7, so "press/" misleads, while "type/" matches GitHub's wording. "Find" understates the box. Its query matches operation titles, IDs, methods and paths, and it also matches description and parameter text. "Find" also overlaps withCtrl+F, the browser's on-page find. "Explore" fits the range of what the box does without that overlap.The wording avoids "search" on purpose, because that word already means the site-wide search or an internet search. The three words now split cleanly: "find" for browser on-page find, "search" for site search, and "explore" for this box.
The input had no accessible name beyond its placeholder, which disappears once you type. The ❲/❳ brackets are ornamental and screen readers read them poorly, so the name and hover text leave them out.
What
Placeholder wording
The placeholder for
type="api"isType ❲/❳ to explore API, with the brackets kept. The existing tests use the new string. The all-APIs landing page uses the same box, so it shows the new wording too.Accessible name and hover text
The
apiinput now hasaria-label="Explore API"and atitleofExplore API operations. Type / to focus.. The name contains the visible words "explore API", so voice-control users can address the box by its label. Thetitlebecomes the accessible description. It names no searched fields, so it stays correct as the search improves. A new test finds the input by its name and checks thetitle.The
skeyTyping
soutside a text field focuses the box, as/does, with the same modifier and text-field guards. A capitalSis ignored. The placeholder still names only/, andaria-keyshortcutslists both keys.Documentation
docs/data/openapi/api-explorer.mdcovers both the sidebar box and the landing page box. It identifies the box by its position and label rather than giving it a name. "API Explorer" is the internal name of the module, so the page no longer says "finder" or "filter box". The sentence no longer says the box matches "by title".Verify
Check on the preview
All APIs landing page — the hero box reads
Type ❲/❳ to explore API, and both/andsfocus it.Elasticsearch: Delete async search — the left navigation box reads
Type ❲/❳ to explore API, and hovering it shows thetitle. Typing/focuses it.Out of scope: The placeholder colour is
textDisabledand probably fails the 4.5:1 contrast ratio. That predates this change and needs its own measurement. Thedocs-type input ("Jump to page") gets noaria-labelortitlehere.🤖 Generated with Claude Code