Skip to content

Commit

Permalink
Fixes mapbox#8731 by adding tooltip to the geolocation control button. (
Browse files Browse the repository at this point in the history
mapbox#8735)

* Fixes mapbox#8731 by adding tooltip to the geolocation control button.

* Sets title and aria-label to "Find my location"
  • Loading branch information
BAByrne authored and Stepan Kuzmin committed Sep 9, 2019
1 parent b1300a9 commit 1a6e9ea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ui/control/geolocate_control.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,8 @@ class GeolocateControl extends Evented {
`${className}-icon ${className}-geolocate`,
this._container);
this._geolocateButton.type = 'button';
this._geolocateButton.setAttribute('aria-label', 'Geolocate');
this._geolocateButton.title = 'Find my location';
this._geolocateButton.setAttribute('aria-label', 'Find my location');

if (this.options.trackUserLocation) {
this._geolocateButton.setAttribute('aria-pressed', 'false');
Expand Down

0 comments on commit 1a6e9ea

Please sign in to comment.