Skip to content

landmark-unique does not match <form role="search"> without an accessible name #5064

Description

@nami8824

Expectation

Two <form role="search"> elements without an accessible name should be flagged as duplicate landmarks by the landmark-unique rule, in the same way that two <div role="search"> elements are.

Actual

<!-- Correctly flagged -->                                                                                                                                                             
<div role="search">div search1</div>
<div role="search">div search2</div>

<!-- Not flagged -->
<form role="search">form search1</form>
<form role="search">form search2</form>                                                                                                                                    

How to Reproduce

https://codepen.io/sign_8824/pen/MYjqZmQ

Additional context

  • lib/rules/landmark-unique-matches.js appears to skip form and section elements that do not have an accessible name.
  • The landmark-unique rule currently flags duplicate landmarks even when they do not have an accessible name.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions