Page MenuHomePhabricator

Keyboard tab navigation to geoshapes
Closed, ResolvedPublic

Description

Currently it is impossible to use keyboard navigation to tab to geoshapes within a map and to access their pop-ups if they have one. We want to change this. After some investigation (see notes below) we decided to go with the demonstrated workaround and add a tabindex to geoshapes. This is meant to be a temporary fix, because there is an approach to fix this in the leaflet library (see notes below). In another ticket we will make sure that only interactive elements will be reached, see T326790: Only make map elements focusable that have an interaction.

  • Test different modes, fullscreen, browsers, etc.
  • Add tabindex to geoshapes (merge POC)

Investigation

  • Why is this currently not possible? --> Leaflet library supports keyboard navigation for markers only, not for shapes.
  • Is this fixable? --> Yes, ideally in the library. There is already an open issue (Accessible vectors #7822) with a pull request (Make vectors focusable and labellable #8251) that would solve it. Since that will need some time and we than would also need to update leaflet, a workaround where we add a tabindex to the shapes later might be an alternative.
  • See how much effort it is to implement a small workaround hack that is good enough to be deployed. --> The POC patch adds a tab index to all interactive elements. Currently it looks like all geoshapes have the interactive class even if they do not have a popup. We decided to change that: T326790.

Investigation timebox: 5

Demo for fix:
https://de.wikipedia.org/wiki/S%C3%BCdbrookmerland#/map/0

  • Tab to geoshape

Event Timeline

ECohen_WMDE set the point value for this task to 5.

Change 875289 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Kartographer@master] [POC] Make it possible to tab navigate to geoshapes

https://gerrit.wikimedia.org/r/875289

thiemowmde renamed this task from Investigation: tab to geoshapes to Investigation: Keyboard tab navigation to geoshapes.Jan 4 2023, 2:34 PM
thiemowmde updated the task description. (Show Details)
thiemowmde added subscribers: thiemowmde, lilients_WMDE.
lilients_WMDE updated the task description. (Show Details)
lilients_WMDE renamed this task from Investigation: Keyboard tab navigation to geoshapes to Keyboard tab navigation to geoshapes.Jan 18 2023, 2:08 PM
lilients_WMDE updated the task description. (Show Details)
lilients_WMDE removed the point value for this task.

Change 875289 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Make it possible to tab navigate to interactive elements

https://gerrit.wikimedia.org/r/875289