Select to view content in your preferred language

Possible to use keyboard navigation to navigate across map layer data points?

283
3
a month ago
JonathanTiu
Occasional Contributor

Hi!

Is it possible to use keyboard navigation to navigate across features on the map?

for example if i have a map with a FeatureLayer or a Graphics Layer and say i had like 10 data points/Graphics rendered on the layer...is there a way to tab into the map and use only some kind of keyboard based navigation to cycle through the 10 points?

so far all i have is the arrow keys moving the extent of the map when focused on the map.

 

 

3 Replies
fdeters
Regular Contributor

This isn't possible out-of-the-box, unfortunately. It's one of the major accessibility issues with the SDK's interactive maps.

However, I've been toying with some ideas for simulating this kind of experience:

  • What if you had all of the features also displayed as items in a list, and the user could tab through that list and see the currently-focused list item highlighted on the map?
    • What if you did this, but visually hid the list and curated focus management/map highlights so the user experience is identical to tabbing through map features?
  • In a simple map, I've implemented custom keyboard controls to allow a user to simulate a click on the center of the map by pressing the Enter key while the map is focused. The user can pan/zoom the center of the map as needed, then click on the center point using only the keyboard. It's not as accessible or slick as tabbing through features, but it does allow keyboard-only map interaction.

Also, you may consider posting this in the Ideas forum. I bet you could get some traction there.

0 Kudos
JonathanTiu
Occasional Contributor

You can already pan/zoom the map using the keyboard today can you not?

That's interesting idea. so we could have kind of list widget or list somewhere and maybe even hide it somehow such that the tabbing would work on it and then we could issue some highlight action on the map corresponding to tabbing to that item on this list.

I crossposted to the Ideas forum just now - thanks!

 

fdeters
Regular Contributor

Yup, the zoom/pan keyboard controls are there by default. I added the click functionality, a "fine pan", and a toggleable reticle that shows where the center of the map is. This was just sort of my first stab at making a map keyboard accessible. You can check it out here: https://ridpatrol.oregonmetro.gov/report/report/location 

I'd love to hear if you get something like the tab list working!

0 Kudos