Skip to content

Replace mapml-focus-buttons with subclass role of composite widget role or proposed focusgroup attribute #535

Open
@Malvoz

Description

@Malvoz

Because map-based popups will be removed there shouldn't be UI components such as mapml-focus-buttons that expect popups (especially one that attempts to solve the general issue with overwhelming keyboard users with tab stops, by allowing users to escape the tab sequence of interactive features).

mapml-focus-buttons is problematic:

  • There have to be features with popups for them to be available to users (i.e. not applicable to feature links)
  • Users have to open a popup for a feature that they may not be interested in to be able to reach the mapml-focus-buttons

Instead there should be a separate navigation mechanism for users to navigate interactive features: arrow keys. It'll have to be conveyed to AT users that interactive features can be navigated using arrow keys, or else they may think there's only 1 interactive feature on a map because the next tab takes them to the attribution.

There are (soon) 2 ways to achieve that:

One of the non-abstract subclass roles of the composite widget role (e.g. role="grid" & CO)

https://www.w3.org/TR/wai-aria-practices-1.1/#keyboard:

Developing a Keyboard Interface

Unlike native HTML form elements, browsers do not provide keyboard support for graphical user interface (GUI) components that are made accessible with ARIA; authors have to provide the keyboard support in their code.

https://www.w3.org/TR/wai-aria-practices-1.1/#kbd_generalnav:

Fundamental Keyboard Navigation Conventions

ARIA roles, states, and properties model accessibility behaviors and features shared among GUI components of popular desktop GUIs, including Microsoft Windows, macOS, and GNOME. Similarly, ARIA design patterns borrow user expectations and keyboard conventions from those platforms, consistently incorporating common conventions with the aim of facilitating easy learning and efficient operation of keyboard interfaces across the web.

A primary keyboard navigation convention common across all platforms is that the tab and shift+tab keys move focus from one UI component to another while other keys, primarily the arrow keys, move focus inside of components that include multiple focusable elements.

The ARIA specification refers to a discrete UI component that contains multiple focusable elements as a composite widget. The process of controlling focus movement inside a composite is called managing focus. Following are some ARIA design patterns with example implementations that demonstrate focus management:

I belive grid is the most appropriate subclass role of the abstract composite role (see Grid ARIA design pattern, example, and corresponding keyboard interactions).

Proposed focusgroup HTML attribute

https://open-ui.org/components/focusgroup.explainer:

When writing custom controls, authors need to implement the semantics of various known controls (see ARIA authoring guide) to enable proper (and expected) keyboard support.

We propose an attribute 'focusgroup' that will facilitate focus navigation (not selection) using arrow keys among a set of focusable elements. The attribute can then be used (without any JavaScript) to easily supply platform-provided focus group navigation into custom-authored controls in a standardized and predictable way for users.

Polyfill https://github.com/MicrosoftEdge/MSEdgeExplainers/blob/main/Focusgroup/focusgroup_polyfill.js.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions