Skip to content

Commit 964e5cd

Browse files
committed
feat: accessibility attributes for map container
1 parent 1938d7b commit 964e5cd

2 files changed

Lines changed: 10 additions & 1 deletion

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
export const ACCESSABILITY_ATTRIBUTES = {
2+
"role": "region",
3+
"aria-label": "Geo Map of aquatic mesocosm facilities",
4+
};

vis/js/templates/Geomap/HeightContainer/index.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,14 @@ import { FC, PropsWithChildren } from "react";
22
import { useSelector } from "react-redux";
33

44
import { getMapHeight } from "./selectors";
5+
import { ACCESSABILITY_ATTRIBUTES } from "./config";
56

67
export const HeightContainer: FC<PropsWithChildren> = ({ children }) => {
78
const height = useSelector(getMapHeight);
89

9-
return <div style={{ height }}>{children}</div>;
10+
return (
11+
<div style={{ height }} {...ACCESSABILITY_ATTRIBUTES}>
12+
{children}
13+
</div>
14+
);
1015
};

0 commit comments

Comments
 (0)