Skip to content

aria-label incorrectly set on markers with no role attribute causing accessibility issues #6435

@cmburcus

Description

@cmburcus

Map markers use div elements with an aria-label="Map marker" and no role which is not recommended from an accessibility standpoint. Markers should either not use div, a proper role attribute should be assigned or no aria-label should be set.

maplibre-gl-js version: 5.7.2

browser: All

Steps to Trigger Behavior

  1. Render a marker on the map
  2. Inspect marker

Link to Demonstration

https://maplibre.org/maplibre-gl-js/docs/examples/add-a-default-marker/

The issue can be clearly seen on the maplibre example by just inspecting the marker on the map.

Image

Expected Behavior

div with role attribute and aria-label OR element that accepts aria-label OR no aria-label supplied

Actual Behavior

div with no role and default aria-label of "Map marker"

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