Open
Description
Description
Running a Lighthouse report for mobile on the playground (opened in a new window) returns this warning about a missing accessible name:
Getting the same on my own site running Autocomplete version 1.6.2.
Running a simple document.getElementById('autocomplete-0-label')
confirms that there is no such element. (Meanwhile document.getElementsByClassName('aa-Autocomplete')[0]
shows the autocomplete element to, indeed, exist with attribute aria-labelledby="autocomplete-0-label"
.)
Please note:
- Said label is missing on the empty state on mobile.
- It's fine after loading some data (performing a search) on mobile.
- It's fine on desktop.
Reproduction
Go to the playground and run Lighthouse for mobile.
Expected behavior
Would expect:
- the label to exist any time '.aa-Autocomplete' exists.
- the warning from Lighthouse to be gone.
Environment
- OS: macOS
- Browser: Brave Version 1.38.109 Chromium: 101.0.4951.41 (Official Build) (arm64)
- Autocomplete version: 1.6.2
Added bonus...
...the joy and satisfaction of knowing you'll help me reach a score of 100 on Accessibility 😁