ArcGIS Blog

Developers

ArcGIS Maps SDK for JavaScript

Navigate Maps Your Way: New Keyboard Accessibility Features

By Kitty Hurley and Lauren Boyd

Version 5.2 of the ArcGIS Maps SDK for JavaScript introduces new keyboard accessibility capabilities allowing keyboards users more flexibility in navigating and exploring map features without the use of a mouse. Using the focus region, Map, Scene, and Link Chart components now offer an adjustable spatial selector that supports moving the map and opening the Popup component to explore feature attributes and available actions.

Navigate the map and explore features using a keyboard.

Explore these new capabilities and how you can use them to provide more accessible keyboard experiences in your applications, including:

Use keyboard shortcuts

Keyboard navigation of map features is active when the Map, Scene, or Link Chart component has focus and the Popup component is slotted or enabled using the following keyboard shortcuts:

Focus region keyboard shortcuts when the map is in focus and the focus region is enabled.
Map action Keyboard shortcut
Enables or disables the focus region
  • Windows: Shift + Alt + letter O keys
  • Mac: Shift + Opt + letter O keys
Moves the focus region area
  • Up arrow key
  • Down arrow key
  • Left arrow key
  • Right arrow key
Increases the focus region area
  • Windows: Shift + Alt + Up arrow keys
  • Mac: Shift + Opt + Up arrow keys
Decreases the focus region area
  • Windows: Shift + Alt + Down arrow keys
  • Mac: Shift + Opt + Down arrow keys
Activates more precise movements of the focus region
  • Windows: Alt and Arrow keys
  • Mac: Opt and Arrow keys
Activates larger movements of the focus region
  • Shift and Arrow keys
Features in the focus region area are displayed in a popup
  • Enter key
  • Space key

Enable keyboard feature exploration

To support keyboard navigation of map features, enable the Popup using one of the following methods.

Slot the Popup component

Add the Popup component to the "popup" slot of the Map, Scene, or Link Chart component:

<!-- Slot the Popup component -->
<arcgis-map basemap="gray">
  <arcgis-popup slot="popup"></arcgis-popup>
</arcgis-map>

Enable the Popup component

Alternatively, set the popupComponentEnabled property on the Map, Scene, or Link Chart component:

<!-- Specify the popupComponentEnabled property -->
<arcgis-map
  basemap="gray"
  popup-component-enabled>
</arcgis-map>

Focus region visibility

The focus region is not visible by default, but can be set as visible on the Map, Scene, or Link Chart using the focusRegionVisible property. Additional keyboard shortcuts are available when the focus region is enabled and the map has focus.

<arcgis-scene
  basemap="osm"
  ground="world-elevation"
  focus-region-visible>
</arcgis-scene>

A 3D Scene application with the focus region active in the map on initialization.

Handle large result sets

When a Feature Service or multiple Feature Services restricts the number of queried records using the maxRecordCount property, a limited records notice will display in the Popup if the popup query exceeds its limit. The notice indicates which layers have reached the maximum number of records allowed. Visible results are adjusted through zooming, panning, and/or decreasing the focus region.

Limited records shown dialog for the ACS Marital Status Boundaries - Tract data layer.

Communicate dynamic changes

When interacting with the Bookmarks, Locate, and Search components, dynamic changes provide more meaningful context to assistive technologies regardless of language. For example, assistive technologies will announce:

  • The name of the Bookmark when selected, and
  • The name of the selected result from the Search component

Manage keyboard focus

Focus management improvements have been added to provide a consistent experience when interacting between map components, including:

  • The Map, Scene, or Link Chart components now offer a focus method to initialize or set focus on-demand.
  • The Popup component is automatically opened and focus is trapped within the component, locking focus in the component until it closes. Focus trapping in the Popup ensures individuals can access features keeping attention on the results.
  • The Search component moves focus from the selected search result to the result displayed in the Popup, then returns focus to Search when the Popup is closed, providing a consistent experience for more users.
// Wait for the view to be ready
// When ready, set focus on the map
await mapElement.viewOnReady();
mapElement.focus();

Synchronize selections across components

Feature Table and Editor offer a syncViewSection boolean property that when set, can allow the coordination of the focus region selection to be synced with other selectable components within an app. For full code references and examples on how to use this, refer to the selection table application code or selection editor application code samples on GitHub.

Sync the selection manager to other components such as the Feature Table to integrate the focus region and keyboard functionality across your app.

Customize the focus region

The focus region supports both light and dark modes by using a black and white border. The focus region also supports CSS variables, allowing customization of the border color and border stroke to complement a map’s features and colors to further contrast and increase access for a broader audience.

Focus region colors are optimized for light and dark modes and can be customized using CSS variables.

Accessibility across ArcGIS applications

ArcGIS Online products that are integrated with the focus region include Map Viewer, ArcGIS Dashboards, ArcGIS Experience Builder, and select ArcGIS Instant Apps templates. All apps using the focus region use the same keyboard shortcuts to provide a consistent and predictable user experience.

Eastern gray squirrels highlighted in the new focus region offering in MapViewer.

Further exploration

To learn more about accessibility, including the focus region and keyboard support:

On the horizon

We’re continuing to make data and maps easier for everyone to access and use. For the focus region, we’re exploring improvements such as summaries of key features and statistics, along with ways AI could help create useful and accessible descriptions.

Please share your experiences, challenges, and suggestions in the Esri Community discussion around the JavaScript Maps SDK accessibility.

Share this article