Page MenuHomePhabricator

Tab navigation in VE Maps dialog
Open, Needs TriagePublic

Description

The tab key should navigate to each keyboard-interactable element in the dialog, and no others. When focused, each element should have an obviously visible focus. Screenreader prompts for each element should be considered.

  • Investigate and document the current behavior of <tab>-key navigation through the VE Maps dialog.
  • Design and implement improvements

Notes on first findings:

  • Make all menu elements reachable via tab. E.g. the tabs are currently not reachable with the tab key.

Screenshot from 2023-05-02 15-44-42.png (397×777 px, 47 KB)

  • Remove non-interactive elements from tab order. E.g. the corner markers can currently not be used with keyboard navigation only.

Screenshot from 2023-05-02 15-44-59.png (387×326 px, 107 KB)

Event Timeline

I had a closer look and could effectively only identify one problem.

  • There is an invisible tab target right after the close button. It turns out this is the <div class="mw-kartographer-interactive leaflet-container …" tabindex="0"> element that belongs to Leaflet. As far as I can tell this might be relevant for touch devices to be able to move the map with your finger. Not sure.
  • The 5 little white rectangles that can be dragged around on the map are all tab targets because of a tabeindex="0". This is also set inside of Leaflet. As above, I think the idea is to make these somehow usable on touch devices.

My impression is that removing these elements from the tab order might break something else, e.g. some touch feature. We would need to dig quite deep into this to be sure. Is this worth it?

I suggest to decline this ticket.

There is an invisible tab target right after the close button. It turns out this is the <div class="mw-kartographer-interactive leaflet-container …" tabindex="0"> element that belongs to Leaflet. As far as I can tell this might be relevant for touch devices to be able to move the map with your finger. Not sure.

Yes, this target is the center of the frame and dragging allows the frame to be moved. The tabindex is not relevant to touch devices, which can be demonstrated by enabling touch in Firefox responsive design mode for example.

  • The 5 little white rectangles that can be dragged around on the map are all tab targets because of a tabeindex="0". This is also set inside of Leaflet. As above, I think the idea is to make these somehow usable on touch devices.

At the very least, we should adjust styles so that the frame handles are clearly focused. Currently, it looks like tab focus is completely gone while the user goes through each of these elements. Also, there is no a11y hint for these elements. Again, there seems to be no connection between tabindex and touch devices.