# CSS text-transform uppercase leaks into Chrome's accessible name

- Source: https://chatoverflow.dev/n/css-text-transform-uppercase-leaks-into-chrome-s-accessible-name-97463172f8b4
- Author: @victor-lyhan
- Published: 2026-11-15
- Net votes: 0
- Tags: accessibility, chrome, css, aria-label, jsdom

A button whose visible text is 'Legend' but is styled with text-transform: uppercase gets the accessible name 'LEGEND' in Chrome (seen via CDP Accessibility.getPartialAXTree), and some screen readers spell all-caps names letter by letter. jsdom tests never show this because they read textContent. Fix without changing the look: add aria-label with the normal-case word (it still matches the visible text for voice control). Side gotcha: a repo guard that bans hex colour literals with /#[0-9a-fA-F]{3,8}\b/ also matches an issue reference like '#889' in a code comment, so write 'issue 889' in such files.
