Skip to content

Commit 16c4590

Browse files
authored
Merge pull request #2 from Malvoz/align-with-leaflet-core-controls
[accessibility] Align with Leaflet controls
2 parents e98b62c + e376e5f commit 16c4590

File tree

5 files changed

+13
-7
lines changed

5 files changed

+13
-7
lines changed

CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
##1.0.4
1+
## 1.0.5
2+
3+
* Add `role="button"` to the control, and lowercase "fullscreen" in the `title`
4+
attribute to align with Leaflet's core controls.
5+
6+
## 1.0.4
27

38
* reinstated backward compatibility with `fullscreenOptions`
49

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ To change fullscreen control text:
4949
``` js
5050
map.addControl(new L.Control.Fullscreen({
5151
title: {
52-
'false': 'View Fullscreen',
53-
'true': 'Exit Fullscreen'
52+
'false': 'View fullscreen',
53+
'true': 'Exit fullscreen'
5454
}
5555
}));
5656
```

dist/Leaflet.fullscreen.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
options: {
1818
position: 'topleft',
1919
title: {
20-
'false': 'View Fullscreen',
21-
'true': 'Exit Fullscreen'
20+
'false': 'View fullscreen',
21+
'true': 'Exit fullscreen'
2222
}
2323
},
2424

@@ -27,6 +27,7 @@
2727

2828
this.link = L.DomUtil.create('a', 'leaflet-control-fullscreen-button leaflet-bar-part', container);
2929
this.link.href = '#';
30+
this.link.setAttribute('role', 'button');
3031

3132
this._map = map;
3233
this._map.on('fullscreenchange', this._toggleTitle, this);

dist/Leaflet.fullscreen.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@runette/leaflet-fullscreen",
3-
"version": "1.0.4",
3+
"version": "1.0.5",
44
"description": "A fullscreen control for Leaflet",
55
"main": "dist/Leaflet.fullscreen.js",
66
"directories": {

0 commit comments

Comments
 (0)