We donโt have to do anything much for the Google Maps Clone when it comes to keyboard accessibility. Googleโs Autocomplete does most of the job for us.
Thereโs only one improvement we can make.
Focusing on the new search box
When the user clicks the โadd new end pointโ button, focus remains on that button. We want to shift focus to the new input so they can begin typing immediately.
addSearchboxButton.addEventListener('click', event => { // ... lastSearchBox.insertAdjacentElement('afterend', clone) clone.querySelector('input').focus()})
Thatโs it!
Welcome! Unfortunately, you donโt have access to this lesson. To get access, please purchase the course or enroll in Magical Dev School.
Unlock this lesson