Using data-testid attributes in tests is an accessibility smell because users can't see or interact with test IDs. Role-based selectors (via Testing Library or Playwright) are superior because they mirror how real users interact with apps, catch inaccessible markup like clickable divs lacking semantic roles, and provide
1 Comment
Sort: