Skip to content

Commit

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

* Sets title and aria-label to "Find my location"
  • Loading branch information
BAByrne authored and mourner committed Sep 9, 2019
1 parent 75b9a40 commit b8b3f7c
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 b8b3f7c

Please sign in to comment.