react-places-autocomplete icon indicating copy to clipboard operation
react-places-autocomplete copied to clipboard

fix: Use unique ids for each suggestion

Open jmhl opened this issue 6 years ago • 0 comments

Summary

Currently, on the mouseover event, each suggestion updates its id to be the active suggestion's id. Each suggestion should have a unique id (this is a best practice and is also necessary for ARIA compliance). This uses the specific suggestion's Google place id as part of the id so that each one is unique.

First, thanks for all the work on this! I was running through our app using react-axe and noticed that when hovering over suggestions there was the following error: IDs used in ARIA and labels must be unique. When inspecting the DOM, I noticed that when hovering over each suggestion that the id attribute would update to be the Google place id of the active/hovered suggestion.

Let me know if I'm missing something, or if I need to update anything. Thanks!

jmhl avatar May 30 '19 21:05 jmhl