Good
Semantik HTML, label, role ve görünür focus state iste.QA PRACTICE•A11Y
Lesson 18 / 20 · Intermediate
Connect accessible markup with reliable automation.
12 min
Not completed
İyi locator çoğu zaman iyi erişilebilir markup’ın sonucudur. Label, role, name ve keyboard flow doğruysa hem screen reader hem automation daha kararlı çalışır. QA, geliştiriciden locator istemek yerine test edilebilirlik contract’ı önerebilir.
Prerequisites: Role and accessible name
Live demo
Try the locator against the live demo.
Semantik HTML, label, role ve görünür focus state iste.Sadece `div` + click handler ile erişilebilirliği gizleme.Test edilebilirlik ve erişilebilirlik aynı ürün sinyallerini güçlendirir.
aria-label eklemek, yanlış role veya keyboard davranışını tek başına düzeltmez.
page.locator("[data-testid='a11y-demo'] input")driver.findElement(By.cssSelector("[data-testid='a11y-demo'] input"))cy.get("[data-testid='a11y-demo'] input")