Skip to content

[Bug]: aria-disabled=true attribute not respected in Enabled actionability check #35423

@AdamOakman

Description

@AdamOakman

Version

1.50.1

Steps to reproduce

  1. Prepare an HTML snippet
<body>
<span aria-disabled="true">
<button>Click me!</button>
</span>
</body>
  1. 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

Image

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

Playwright v1.50.1

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions