Description
Product
playwright
Product Version
4.9.0
Latest Version
- I have tested the issue with the latest version of the product
Issue Description
Expectation
Here is a code pen on which the issue is detailed. I don't know how to easily share this with playwright but a code like the following should yield the same error:
await page.goto('https://codepen.io/TimCanYou/pen/mdgNyRz')
const accessibilityScanResults = await new AxeBuilder({ page }).exclude("").analyze()
expect(accessibilityScanResults.violations).toEqual([])
I have a table showing data. Above and below the table are one navigation landmark (both are identical). In such a situation, according to W3C:
If a specific landmark role is used more than once on a page, provide each instance of that landmark with a unique label. There is one rare circumstance where providing the same label to multiple instances of a landmark can be beneficial: the content and purpose of each instance is identical. For example, a large search results table has two sets of identical pagination controls -- one above and one below the table, so each set is in a navigation region labelled Search Results. In this case, adding extra information to the label that distinguishes the two instances may be more distracting than helpful.
So I don't expect the error "landmark-unique" for my <nav>
s having the same aria-label...
Actual
I have the error "landmark-unique": https://dequeuniversity.com/rules/axe/4.9/landmark-unique?application=playwright
How to Reproduce
If you consider that this is expected and wanted behaviour, what is your recommendation in such a case?