Skip to content

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

@nami8824

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

No one assigned

    Labels

    ungroomedTicket needs a maintainer to prioritize and label

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions