Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update marker: role=button, alt=marker #7895

Merged
merged 2 commits into from
Jan 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/layer/marker/Marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export var Marker = Layer.extend({
// Text for the browser tooltip that appear on marker hover (no tooltip by default).
title: '',
Malvoz marked this conversation as resolved.
Show resolved Hide resolved

// @option alt: String = ''
// @option alt: String = 'Marker'
// Text for the `alt` attribute of the icon image (useful for accessibility).
alt: '',
alt: 'Marker',

// @option zIndexOffset: Number = 0
// By default, marker images zIndex is set automatically based on its latitude. Use this option if you want to put the marker on top of all others (or below), specifying a high value like `1000` (or high negative value, respectively).
Expand Down Expand Up @@ -225,6 +225,7 @@ export var Marker = Layer.extend({

if (options.keyboard) {
icon.tabIndex = '0';
icon.setAttribute('role', 'button');
Malvoz marked this conversation as resolved.
Show resolved Hide resolved
}

this._icon = icon;
Expand Down