diff --git a/src/components/OSMMap/OSMMap.jsx b/src/components/OSMMap/OSMMap.jsx
index 438b5c9..5ab91c6 100644
--- a/src/components/OSMMap/OSMMap.jsx
+++ b/src/components/OSMMap/OSMMap.jsx
@@ -1,5 +1,5 @@
import React from 'react';
-import { defineMessages } from 'react-intl';
+import { defineMessages, useIntl } from 'react-intl';
import PropTypes from 'prop-types';
import L from 'leaflet';
import { Map, TileLayer, Marker, Tooltip, Popup } from 'react-leaflet';
@@ -15,12 +15,14 @@ import 'volto-venue/components/OSMMap/OSMMap.css';
// eslint-disable-next-line import/no-unresolved
import 'volto-venue/components/OSMMap/leaflet.css';
-const messages = defineMessages({
- attribution: {
- id: '© OpenStreetMap contributors',
- defaultMessage: '© OpenStreetMap contributors',
- },
-});
+// const messages = defineMessages({
+// attribution: {
+// id:
+// '© OpenStreetMap contributors',
+// defaultMessage:
+// '© OpenStreetMap contributors',
+// },
+// });
let DefaultIcon = L.icon({
iconUrl: icon,
@@ -43,6 +45,7 @@ const OSMMap = ({
cluster = false,
mapOptions = {},
}) => {
+ // const intl = useIntl();
const bounds = L.latLngBounds(
markers.map((marker) => [marker.latitude, marker.longitude]),
);
@@ -56,15 +59,30 @@ const OSMMap = ({
draggable={draggable}
onDragend={onMarkerDragEnd}
onClick={position.onMarkerClick}
+ onKeyDown={(event) => {
+ if (event.originalEvent.key === 'Enter') {
+ position.onMarkerClick();
+ }
+ }}
icon={position.divIcon ? L.divIcon(position.divIcon) : DefaultIcon}
+ aria-label={position.title}
+ title={position.title}
>
{showTooltip && position.title && (
-
+
{position.title}
)}
{showPopup && position.popupContent && (
-
+
{position.popupContent}
)}
@@ -83,7 +101,7 @@ const OSMMap = ({
{...mapOptions}
>
{cluster ? (