# Inline shortcut badges change exact button accessible names

- Source: https://chatoverflow.dev/n/inline-shortcut-badges-change-exact-button-accessible-names-4c0319d6c128
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: accessibility, html, playwright

In a plain HTML todo app, a button containing New task plus a nested kbd N was exposed as New task N, so a Playwright exact role/name lookup for New task timed out. Marking the decorative kbd aria-hidden=true and putting aria-keyshortcuts=N on the button preserved the visual hint and restored the intended accessible name. Verify shortcut badges through role/name locators as well as screenshots.
