Skip to content
Back to skills

2026 09 05 Sonnet

ASecurity

```css .drawer { opacity: 0; transform: translateX(100%); } ```

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 15, 2026
ai-agentsgonode

Security analysis

A100/100

Pro scans all 21 files and shows the line behind each finding

Scanned November 15, 2026

npx -y skills add AgentsORG/design-engineering --skill 2026-09-05-sonnet --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of 2026 09 05 Sonnet?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for 2026 09 05 Sonnet
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/agentsorg-2026-09-05-sonnet-2c1de947/badge)](https://www.skillsdirectory.com/skills/agentsorg-2026-09-05-sonnet-2c1de947)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Repair: keyboard users tab into the closed drawer

## Issue

```css
.drawer { opacity: 0; transform: translateX(100%); }
```

`opacity: 0` and an off-screen `transform` only hide a drawer *visually*. Every control inside it stays in the tab order, so a keyboard user tabs past the trigger straight into a panel they cannot see, with no way to tell where focus went.

## Fixed code

```css
.drawer {
  position: fixed;
  inset-block: 0;
  right: 0;
  width: min(360px, 100vw);

  /* visual closed state — GPU-only properties */
  opacity: 0;
  transform: translateX(100%);
  transition: transform 240ms var(--ease-out-quart, cubic-bezier(0.165, 0.84, 0.44, 1)),
              opacity 240ms var(--ease-out-quart, cubic-bezier(0.165, 0.84, 0.44, 1));
}

.drawer[data-state="open"] {
  opacity: 1;
  transform: translateX(0);
}
```

```html
<div
  class="drawer"
  role="dialog"
  aria-modal="true"
  aria-labelledby="drawer-title"
  data-state="closed"
  inert
>
  <h2 id="drawer-title">Drawer title</h2>
  <button type="button" aria-label="Close" data-dismiss>×</button>
  <!-- drawer content -->
</div>
```

```js
function setDrawerOpen(drawerEl, triggerEl, open) {
  drawerEl.dataset.state = open ? "open" : "closed";
  // `inert` pulls every descendant out of the tab order AND blocks
  // pointer/AT interaction — opacity/transform alone do neither.
  drawerEl.inert = !open;

  if (open) {
    // focus moves in: first focusable control (or the dialog itself)
    drawerEl.querySelector("[data-autofocus], button, a, input")?.focus();
  } else {
    // focus never strands on a removed/hidden node — give it back
    triggerEl.focus();
  }
}
```

## Rationale

This matches the exact entry already logged in `[[gotchas]]` (2026-09-05): *"Agent hid a closed drawer with `opacity: 0`; keyboard users tabbed into it → `inert` or `visibility: hidden`. See `[[touch-and-focus]]`."* The repair applies `[[touch-and-focus]]` rule 6 (hidden content must leave the tab order via `visibility: hidden`, `display: none`, or `inert` — never `opacity: 0` or an off-screen transform alone) and rule 7 (overlays move focus in on open and restore it to the trigger on close, never stranding focus on a removed node), backed by `[[accessibility-baseline]]`'s keyboard floor ("everything interactive is reachable by Tab" cuts both ways — nothing *invisible* should be). `inert` was chosen over `visibility: hidden` because it removes the panel from both the tab order and the accessibility tree while leaving `opacity`/`transform` free to keep doing the visual animation — which `[[transform-opacity-only]]` requires stay GPU-only properties, so the fix doesn't trade a11y for jank. The dialog role, label, and explicit close control follow `[[tray-rules]]`'s "title + dismiss are always present" rule for this drawer/tray pattern. `[[pov]]` (this install's Duolingo fork) is silent on drawer/focus mechanics, so canonical guidance holds untouched.

Files in this skill

  • REPORT.md1.3 KB
  • edit-dropdown-01.baseline.md1.2 KB
  • edit-dropdown-01.skill.md2.2 KB
  • edit-hover-01.baseline.md741 B
  • edit-hover-01.skill.md2.6 KB
  • gen-form-01.baseline.md11.2 KB
  • gen-form-01.skill.md16.2 KB
  • gen-modal-01.baseline.md7.2 KB
  • gen-modal-01.skill.md10.7 KB
  • gen-send-sound-01.baseline.md10.4 KB
  • gen-send-sound-01.skill.md10.5 KB
  • gen-toolbar-01.baseline.md5.2 KB
  • gen-toolbar-01.skill.md12.2 KB
  • repair-darkmode-01.baseline.md1.1 KB
  • repair-darkmode-01.skill.md2 KB
  • repair-focus-01.baseline.md1.7 KB
  • repair-focus-01.skill.md2.9 KB
  • repair-input-01.baseline.md1003 B
  • repair-input-01.skill.md1.7 KB
  • repair-spinner-01.baseline.md1.7 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.