Keyboard accessible markers with Google maps js api
Asked Answered
N

2

6

As per the WCAG and section 508, all the informations on a website must be accessible using only the keyboard.

I have a google maps with some markers on it that open a modal with dedicated informations.

The problem is that Markers with google maps js API are invisible to keyboard and can't be focused using TAB key. So a keyboard user can't access the contents behind the Markers.

Is there a way around this ? I haven't found anything in the API documentation and no mention of "focus" on markers.

Any solution is welcome.

Needy answered 24/8, 2015 at 14:16 Comment(1)
Please see updated answer at https://mcmap.net/q/1757901/-keyboard-accessible-markers-with-google-maps-js-api.Dictaphone
S
5

Instead of native Markers you may create the markers by using custom overlays.

The overlay in this case would be accessible when it is a link (or does have a tabIndex-property)

Shan answered 24/8, 2015 at 14:48 Comment(1)
Thanks for the workaround. I see no other solution. Too bad google didn't implement anything for this use case ...Needy
E
0

Google does now (serveral years later) support keyboard navigation for markers - https://developers.google.com/maps/documentation/javascript/examples/marker-accessibility. Whatever markers are in the current extent can be accessed via the arrow keys and enter or spacebar will open the info window.

Exonerate answered 3/11, 2021 at 15:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.