activities: fix aria-label on tablist

For some reason the compiler didn't give an error even though aria-label
was not a valid property.
This commit is contained in:
David Lechner
2022-12-16 17:54:36 -06:00
committed by David Lechner
parent 017fe81c43
commit b38c302d7a
+12 -1
View File
@@ -85,9 +85,20 @@ const Activities: React.VoidFunctionComponent = () => {
}
}, [tabsRef]);
useEffect(() => {
// @ts-expect-error: using private property
const tablist: HTMLDivElement = tabsRef.current?.tablistElement;
// istanbul-ignore-if: should not happen
if (!tablist) {
return;
}
tablist.setAttribute('aria-label', i18n.translate('title'));
}, [i18n]);
return (
<Tabs
aria-label={i18n.translate('title')}
vertical={true}
className="pb-activities"
selectedTabId={selectedActivity}