Version
1.50.1
Steps to reproduce
- Prepare an HTML snippet
<body>
<span aria-disabled="true">
<button>Click me!</button>
</span>
</body>
- Run test snippet:
test('Test', async ({ page }) => {
await page.goto('http://localhost:8080/');
await expect(page.locator('button')).toBeDisabled();
});
Expected behavior
Test passes ✅
Actual behavior
Test fails

Additional context
According to docs https://playwright.dev/docs/actionability#enabled
Element is disabled when:
- it is a descendant of an element with [aria-disabled=true] attribute.
Environment
Version
1.50.1
Steps to reproduce
Expected behavior
Test passes ✅
Actual behavior
Test fails
Additional context
According to docs https://playwright.dev/docs/actionability#enabled
Environment