Pull requests / #2546
#2546 web: the closed Sampling drawer leaves the keyboard's Tab order; opening it focuses it, closing returns focus
closed · @qiuzan2001 · 0 comentarios · En GitHub
Server & APINVIDIA / CUDASecurityLinux
Descripción
**What it changes.** Closed, the Chat page's Sampling drawer is only moved off-screen (`transform: translateX(100%)`), so its 14 controls (Close, the four Thinking buttons, temperature, top-p, top-k, max tokens, seed, the switches, Reset, Apply) stayed in the keyboard's Tab order right after **Send**, inside `aria-hidden="true"`. A keyboard user tabbed through invisible buttons, and a screen reader landed on controls it was told were hidden. Now: - the drawer is `inert` while closed (in `index.html` at load, and set in `openDrawer`); - opening it moves focus to its **Close** button (before, focus stayed on the button behind the scrim); - closing it (Escape, Close, Apply, a click on the scrim) puts focus back on the **Sampling** button (before, after Escape focus stayed on a button that was now off-screen). **What it leaves alone.** The drawer's look, its settings and what they send, and every other part of the page. A browser without `inert` (Chrome < 102, Firefox < 112, Safari < 15.5) behaves as before, plus the focus moves. **How it was checked.** - Headless Chromium (Playwright) against a running Strata 0.1.44.1 server (RTX 5070 Ti, Linux), with this branch's `index.html` and `app.js` served in place of the release's, Tab pressed 30 times from the message box: - before: 14 drawer controls reached with the drawer closed; after opening, focus on `sampling-btn`; after Escape, focus on a button inside the closed drawer; - after: 0 drawer controls reached; after opening, focus on `drawer-close` and Tab moves through the drawer; after Escape, focus on `sampling-btn`. - New static test `WebApp.test_the_closed_drawer_is_out_of_the_tab_order` (fails without the change). `python -m unittest serve.test_server serve.test_security serve.test_frontend serve.test_request_hardening serve.test_monitor serve.test_runconfig`: all pass (392 tests). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
En el sitio
Enlaces a install, modelos, releases.