nerucheva / ashstone-test-task

https://nerucheva.github.io/ashstone-test-task/
0 stars 0 forks source link

Element name: Form control without label #14

Open TatianaFokina opened 4 months ago

TatianaFokina commented 4 months ago

Description & explanation

A search field element hasn't been labeled. Because of it, screen reader users don't know what the purpose of this field is. Screen readers can read content from the placeholder attribute, but this is an antipattern. Also, you don't use the attribute based on its purpose.

Type of issue

Critical.

How to reproduce

  1. Turn on a screen reader.
  2. Open your project in any browser, for instance, Chrome.
  3. Set focus on the field element by pressing Tab on Windows/MacOS.
  4. Listen to an announcement.

How to fix

Add a label by using the aria-label attribute. It's better to find the proper name, not "search," because you've already used it for the button control.

Screenshots

WAVE:

image