diff --git a/src/editor/Editor.tsx b/src/editor/Editor.tsx index 2f5a6735..0e33879d 100644 --- a/src/editor/Editor.tsx +++ b/src/editor/Editor.tsx @@ -282,6 +282,20 @@ const EditorTabs: React.VoidFunctionComponent = ({ onChange }) tabsRef.current?.['moveSelectionIndicator'](); }, [tabsRef]); + const i18n = useI18n(); + + 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('tablist.label')); + }, [i18n]); + return ( { }); const isEmpty = useSelector((s) => s.editor.openFileUuids.length === 0); + const { activeFileUuid } = useSelector((s) => s.editor); + const fileName = useFileStoragePath(activeFileUuid ?? ('' as UUID)); + console.log(fileName); return (
@@ -477,6 +494,7 @@ const Editor: React.VFC = () => {