Skip to content

Commit 35be214

Browse files
improved tab support
1 parent b6e102e commit 35be214

File tree

5 files changed

+76
-4
lines changed

5 files changed

+76
-4
lines changed

css/style.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,32 @@ a[aria-disabled="true"] {
14491449
}
14501450

14511451

1452+
.btn:focus, .chip_x:focus,
1453+
.chip_x:focus-visible {
1454+
/* Remove the 'filled' look and the double outline */
1455+
1456+
box-shadow: none !important;
1457+
/* Kill all default browser and Bootstrap shadows/outlines */
1458+
outline: none !important;
1459+
box-shadow: none !important;
1460+
text-decoration: none !important;
1461+
1462+
/* Apply exactly ONE clean outline */
1463+
/* Using 2px solid with an offset to prevent 'doubling' */
1464+
outline: 2px solid #006271 !important;
1465+
outline-offset: 1px;
1466+
1467+
/* 3. Ensure it looks like a tight square/circle around the X */
1468+
display: inline-block;
1469+
border-radius: 4px;
1470+
}
1471+
.chip_x:focus-visible {
1472+
background-color: transparent !important;
1473+
}
1474+
/* Optional: If using Chrome/Safari, prevent the outline from looking 'doubled' */
1475+
.form-check-input:focus:not(:focus-visible) {
1476+
outline: none;
1477+
}
14521478
/* Responsive adjustments for smaller screens */
14531479
@media (max-width: 768px) {
14541480
#footer {

data/Historic Maps.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -755,6 +755,7 @@ Lucas,,WGDC00120,y,https://archives.mountainscholar.org/digital/api/singleitem/c
755755
Sophia,,WGDC00124,y,https://archives.mountainscholar.org/digital/api/singleitem/collection/,p17393coll166,AllMaps,https://archives.mountainscholar.org/digital/api/singleitem/collection/p17393coll166/id/24876/thumbnail,https://archives.mountainscholar.org/digital/download/collection/p17393coll166/id/24876/size/full,https://archives.mountainscholar.org/iiif/2/p17393coll166:24876/info.json,https://editor.allmaps.org/#/collection?url=https://archives.mountainscholar.org/iiif/2/p17393coll166:24876/info.json,https://annotations.allmaps.org/images/cedf01a033918547,annotations/cedf01a033918547.json,https://allmaps.xyz/maps/c21b712dd4b2b9bc/{z}/{x}/{y}.png,,,County,Otero,,,,,,,,,,,,,,,,,,,,,,,,1952,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,https://archives.mountainscholar.org/digital/collection/p17393coll166/id/24876/rec/1,24876,,,,p17393coll166-24876,"{""type"": ""FeatureCollection"", ""features"": [{""type"": ""Feature"", ""properties"": {""@context"": ""https://schemas.allmaps.org/map/2/context.json"", ""id"": ""https://annotations.allmaps.org/maps/c21b712dd4b2b9bc"", ""type"": ""GeoreferencedMap"", ""created"": ""2024-01-26T20:50:56.386Z"", ""modified"": ""2024-01-26T21:48:11.039Z"", ""resource"": {""id"": ""https://archives.mountainscholar.org/iiif/2/p17393coll166:24876"", ""width"": 12040, ""height"": 7331, ""type"": ""ImageService2""}, ""gcps"": [{""resource"": [2198, 3047], ""geo"": [-104.0136982, 38.1304684]}, {""resource"": [6467, 4665], ""geo"": [-103.630958, 38.0152128]}, {""resource"": [8252, 3671], ""geo"": [-103.4717026, 38.0845247]}, {""resource"": [7630, 3677], ""geo"": [-103.5282072, 38.0845247]}, {""resource"": [4810, 5106], ""geo"": [-103.7834257, 37.9816532]}, {""resource"": [7230, 5107], ""geo"": [-103.5661962, 37.9839834]}], ""resourceMask"": [[9095, 1117], [7814, 1144], [7805, 2453], [6560, 2453], [6551, 3249], [4784, 3249], [4519, 3084], [2423, 2727], [1645, 2691], [1673, 6114], [9132, 6114]], ""transformation"": {""type"": ""polynomial"", ""options"": {""order"": 1}}, ""_allmaps"": {""id"": ""https://annotations.allmaps.org/maps/c21b712dd4b2b9bc"", ""version"": ""https://annotations.allmaps.org/maps/c21b712dd4b2b9bc@222c68a75c106371"", ""image"": {""id"": ""https://annotations.allmaps.org/images/cedf01a033918547"", ""version"": ""https://annotations.allmaps.org/images/cedf01a033918547@6ede7f0ed27fe852"", ""canvases"": []}, ""scale"": 0.12679, ""area"": 1634277643.44}}, ""geometry"": {""type"": ""Polygon"", ""coordinates"": [[[-103.39226157, 38.26711624], [-103.507189987, 38.26527847], [-103.509956095, 38.171987392], [-103.621615403, 38.172071465], [-103.623613802, 38.115341606], [-103.782089301, 38.115460929], [-103.805609217, 38.127238281], [-103.993057219, 38.152823009], [-104.062779201, 38.155441246], [-104.065390545, 37.911484091], [-103.396421247, 37.910980392], [-103.39226157, 38.26711624]]]}}]}",38.04195589,-103.7044061,2642.355462
756756
Kasper,complete,,y,https://archives.mountainscholar.org/digital/api/singleitem/collection/,p17393coll150,AllMaps,https://archives.mountainscholar.org/digital/api/singleitem/collection/p17393coll150/id/1500/thumbnail,https://tile.loc.gov/image-services/iiif/service:gmd:gmd431m:g4314m:g4314fm:g009961906:00996_1906-0016/full/pct:25/0/default.jpg,https://archives.mountainscholar.org/iiif/2/p17393coll150:1500/info.json,https://editor.allmaps.org/#/collection?url=https://archives.mountainscholar.org/iiif/2/p17393coll150:1500/info.json,https://annotations.allmaps.org/images/8e440e1a8612dc66,annotations/8e440e1a8612dc66.json,https://allmaps.xyz/images/8e440e1a8612dc66/{z}/{x}/{y}@2x.png,"historic, inlandWaters","plss, irrigation, handDrawn",City,Map of the North Park Reservoir and interstate tunnel (sheet 2 of 2),,Unidentified author,,,,,,,,,,Larimer County (Colo.); Wyoming,1907,,,,,,,,,,,1907,,,,,,Sheet 2 of a map of the North Park Reservoir and interstate tunnel between Colorado and Wyoming.,,,,,,Reservoirs -- Colorado -- Larimer County -- Maps,,English,eng,,blueprints (reprographic copies),24 x 36 inches,StillImage,,Carpenter (Delph E. and Family) Papers,Carpenter (Delph E. and Family) Papers,"
757757
Series 2: DEC professional papers; Subseries 2.5: Oversize, 1880-1932 and undated",,Colorado State University. Libraries,,,,,The copyright and related rights status of this Item has not been evaluated (https://rightsstatements.org/vocab/CNE/1.0/). Please refer to the organization that has made the Item available for more information.,wdecm039.tif; WDECS02E200039,,,,,Finding aid: https://archives.colostate.edu/repositories/2/resources/193; wwdl,,,,Contained in: Large blueprints. 1906-1909,,,,,,,,wdecm039.jpg,,,,http://cdm17393.contentdm.oclc.org/cdm/ref/collection/p17393coll150/id/1500,1500,,,,p17393coll150-1500,"{""type"": ""FeatureCollection"", ""features"": [{""type"": ""Feature"", ""properties"": {""@context"": ""https://schemas.allmaps.org/map/2/context.json"", ""id"": ""https://annotations.allmaps.org/maps/86d02d6941be3cf0"", ""type"": ""GeoreferencedMap"", ""created"": ""2025-12-05T20:42:03.501Z"", ""modified"": ""2025-12-05T20:42:03.501Z"", ""resource"": {""id"": ""https://archives.mountainscholar.org/iiif/2/p17393coll150:1500"", ""uri"": ""https://archives.mountainscholar.org/iiif/2/p17393coll150:1500"", ""type"": ""ImageService2"", ""width"": 7279, ""height"": 4805}, ""gcps"": [{""id"": ""0833866aede666b9"", ""index"": 0.22854264028111204, ""resource"": [2357, 1865], ""geo"": [-106.34578297201736, 40.99987526795974]}, {""id"": ""9e686b916d4872d4"", ""index"": 1.4334507287334626, ""resource"": [1420, 1796], ""geo"": [-106.35259795715756, 40.973839480647655]}, {""id"": ""f841ae1a7b723534"", ""index"": 2.033099360451952, ""resource"": [1111, 2330], ""geo"": [-106.33333780262298, 40.96503677554378]}], ""resourceMask"": [[495, 1306], [535, 2869], [1791, 2852], [2757, 2818], [4229, 346]], ""transformation"": {""type"": ""polynomial"", ""options"": {""order"": 1}}, ""_allmaps"": {""id"": ""https://annotations.allmaps.org/maps/86d02d6941be3cf0"", ""version"": ""https://annotations.allmaps.org/maps/86d02d6941be3cf0@23974c3f6d8e2c8d"", ""image"": {""id"": ""https://annotations.allmaps.org/images/8e440e1a8612dc66"", ""version"": ""https://annotations.allmaps.org/images/8e440e1a8612dc66@3aef7236e5a9b36c"", ""canvases"": []}, ""scale"": 0.315347, ""area"": 56909750.28}}, ""geometry"": {""type"": ""Polygon"", ""coordinates"": [[[-106.37562314, 40.948289609], [-106.315066904, 40.948800583], [-106.310161432, 40.983753275], [-106.307196938, 41.01063114], [-106.396172199, 41.052497903], [-106.37562314, 40.948289609]]]}}]}",40.99313919,-106.351249,99.98402365
758+
Kevin,,,,https://archives.mountainscholar.org/digital/api/singleitem/collection/,p17393coll113,AllMaps,https://archives.mountainscholar.org/digital/api/singleitem/collection/p17393coll13/id/4499/thumbnail,https://archives.mountainscholar.org/digital/download/collection/p17393coll12/id/4499/size/full,https://archives.mountainscholar.org/iiif/2/p17393coll13:4499/info.json,https://editor.allmaps.org/#/collection?url=https://archives.mountainscholar.org/iiif/2/p17393coll13:4499/info.json,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,https://archives.mountainscholar.org/digital/collection/p17393coll13/id/4499/rec/1,4499,,,,p17393coll13-4499,,,,
758759
Kevin,,,y,,,AllMaps,"https://tile.loc.gov/image-services/iiif/service:gmd:gmd431m:g4314m:g4314fm:g009961906:00996_1906-0016/full/337,/0/default.jpg",https://tile.loc.gov/image-services/iiif/service:gmd:gmd431m:g4314m:g4314fm:g009961906:00996_1906-0001/full/pct:12.5/0/default.jpg,https://www.loc.gov/item/sanborn00996_005/manifest.json,https://editor.allmaps.org/#/collection?url=https://www.loc.gov/item/sanborn00996_005/manifest.json,https://annotations.allmaps.org/images/f044228ea0ca8b38,annotations/f044228ea0ca8b38.json,,"historic,structure,economy,structure","roads,buildings",City,"Sanborn Fire Insurance Map from Fort Collins, Larimer County, Colorado. 16",,Sanborn Map Company,,,,,,,,,,,1906,,,,,,,,,,,1906-03,,,,,,,,,,,,,,,,,,,,,,,,,Library of Congress,"The content of the Library of Congress online Sanborn Maps Collection is in the public domain and is free to use and reuse.
759760

760761
Credit Line: Library of Congress, Geography and Map Division, Sanborn Maps Collection.

js/filter_manager.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@ class Filter_Manager {
8787

8888
} , "500");
8989
}
90+
// add 'enter' key support for bootstap - default is just space bar
91+
$(document).on('keydown', '.form-check-input', function(e) {
92+
// Check if the key pressed is Enter (13) or Space (32)
93+
if (e.which === 13) {
94+
$(this).click();
95+
e.preventDefault(); // Prevents page jumping when hitting Space
96+
}
97+
});
98+
$(document).on('keydown', '.chip_x', function(e) {
99+
// Check if the key pressed is Enter (13) or Space (32)
100+
if (e.which === 13 || e.which === 32 ) {
101+
$(this).click();
102+
e.preventDefault(); // Prevents page jumping when hitting Space
103+
}
104+
});
90105

91106

92107
}
@@ -280,7 +295,7 @@ class Filter_Manager {
280295
var id =_id+ext
281296

282297
//create a list of selected filters to easily keep track
283-
var html="<div class='chip blue lighten-4' id='"+id+"'><span class='chip-text'>"+text+"</span><a class='bi bi-x btn chip_x' ></a></div>"
298+
var html=`<div class='chip blue lighten-4' id='${id}' ><span class='chip-text'>${text}</span><a class='bi bi-x btn chip_x' tabindex="0" role="button" aria-label="Remove filter"></a></div>`
284299
//if exists update it
285300
if($( "#"+id ).length) {
286301
$( "#"+id +" span").html(text)

js/image_manager.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ class Image_Manager {
1515

1616
this.image_map._resetView(this.image_map.getCenter(), this.image_map.getZoom());
1717
this.add_close_control()
18+
$(".leaflet-close-but").attr("tabindex", "0");
19+
$(document).on('keydown', '.leaflet-close-but', function(e) {
20+
// Check if the key pressed is Enter (13) or Space (32)
21+
if (e.which === 13 || e.which === 32) {
22+
$(this).click();
23+
e.preventDefault(); // Prevents page jumping when hitting Space
24+
}
25+
});
26+
1827
this.add_load_control()
1928

2029
//add resize control

js/layer_manager.js

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ class Layer_Manager {
8383
$("#map_panel_scroll").scrollTop(scrollTop-Math.round(delta));
8484
});
8585

86+
$(document).on('keydown', '.leaflet-marker-icon', function(e) {
87+
// 13 is 'Enter', 32 is 'Space'
88+
if (e.which === 13 || e.which === 32) {
89+
// Trigger the Leaflet 'click' event
90+
$(this).trigger('click');
91+
92+
// Prevent page from scrolling down if 'Space' is pressed
93+
e.preventDefault();
94+
}
95+
});
96+
8697
}
8798
update_layer_order(){
8899
//based on the sortable
@@ -870,10 +881,13 @@ class Layer_Manager {
870881
feature.id= feature.features[0].id
871882
geo =L.geoJSON(feature, {pane: _resource_id, style: style,
872883
pointToLayer: function(feature, latlng) {
873-
return L.marker(latlng, { icon: map_manager.get_marker_icon(extra)});
884+
return L.marker(latlng, { icon: map_manager.get_marker_icon(extra),keyboard: true});
874885
},onEachFeature: function(feature, layer){
875-
886+
876887
layer.on('click', function (e) {
888+
//keep track of who was clicked
889+
console.log(e)
890+
layer_manager.lastFocusedMarker=e.target
877891
var text = LANG.RESULT.ADD
878892
var _class ="btn-primary"
879893
var p = e.target.feature.properties
@@ -889,10 +903,17 @@ class Layer_Manager {
889903
html+=`<button type="button" class="btn btn-primary" style='display:none;' onclick="layer_manager.zoom_layer('0','${p.id}')">Zoom</button>`
890904
html+=`<button type="button" class="btn btn-success" onclick="filter_manager.select_item(0,'${p.id}')">Details</button>`
891905

892-
L.popup()
906+
var popup = L.popup()
893907
.setLatLng(e.latlng)
894908
.setContent(html)
895909
.openOn(map_manager.map);
910+
911+
popup.on('remove', function () {
912+
if (layer_manager.lastFocusedMarker?._icon) {
913+
layer_manager.lastFocusedMarker._icon.focus();
914+
layer_manager.lastFocusedMarker = null;
915+
}
916+
});
896917
});
897918
}
898919
})

0 commit comments

Comments
 (0)