Skip to content

Confusion with require-input-label #1835

Closed
@locks

Description

@locks

I have the following template code that triggered the require-input-label lint:

<div class="search-input">
  <label class="visually-hidden" for="search-input">Search</label>
  <input
    id="search-input"
    type="search"
    placeholder="Search deprecations"
    autocomplete="off"
    aria-label="Search"
    {{on "input" (perform this.searchService.search value="target.value")}}
  >
</div>

I was a bit confused as I have label and an aria-label, and wasn't sure how to address it.
I ended up removing aria-label at the suggestion of someone in Discord.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions