mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 17:45:22 +00:00
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:
committed by
David Lechner
parent
017fe81c43
commit
b38c302d7a
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user