# Test IDs are an a11y smell

DevFeed: [Test IDs are an a11y smell](<https://devfeed.tech/articles/test-ids-are-an-a11y-smell-48236.md>)

Original publisher: [Read original article](<https://tkdodo.eu/blog/test-ids-are-an-a11y-smell>)

Published: 2026-03-23T00:00:00Z

Content type: opinion

Language: en

Sources: [TkDodo](<https://devfeed.tech/sources/tkdodo-s-blog.md>)

Topics: [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [Web Accessibility (a11y)](<https://devfeed.tech/topics/web-accessibility.md>), [Playwright](<https://devfeed.tech/topics/playwright.md>), [testing-library](<https://devfeed.tech/topics/testing-library.md>), [Selenium](<https://devfeed.tech/topics/selenium.md>)

Tags: [accessibility](<https://devfeed.tech/tags/accessibility.md>), [playwright](<https://devfeed.tech/tags/playwright.md>), [selenium](<https://devfeed.tech/tags/selenium.md>), [test-coverage](<https://devfeed.tech/tags/test-coverage.md>), [testing](<https://devfeed.tech/tags/testing.md>), [testing-library](<https://devfeed.tech/tags/testing-library.md>), [tests](<https://devfeed.tech/tags/tests.md>)

## AI overview

The article argues that test IDs are inferior selectors because users cannot see them and they couple tests to implementation details. It recommends role-based selectors, including those provided by Testing Library and Playwright, and connects this approach to maintainability and accessibility.

## Source excerpt

Users don't use data-testid, so why do your tests?