Skip to content

Commit 1360c8c

Browse files
author
Fedo Hagge-Kubat
committed
fix(a11y): wrap aria-labels with t() for i18n support
1 parent a70373a commit 1360c8c

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎superset-frontend/src/features/home/Menu.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
*/
1919
import { useState, useEffect } from 'react';
2020
import { styled, css, useTheme } from '@apache-superset/core/theme';
21+
import { t } from '@apache-superset/core/translation';
2122
import { ensureStaticPrefix } from 'src/utils/assetUrl';
2223
import { ensureAppRoot } from 'src/utils/pathUtils';
2324
import { getUrlParam } from 'src/utils/urlUtils';
@@ -334,7 +335,7 @@ export function Menu({
334335
return <>{link}</>;
335336
};
336337
return (
337-
<StyledHeader className="top" id="main-menu" role="navigation" aria-label="Main navigation">
338+
<StyledHeader className="top" id="main-menu" role="navigation" aria-label={t('Main navigation')}>
338339
<StyledRow>
339340
<StyledCol md={16} xs={24}>
340341
<Tooltip

‎superset-frontend/src/features/home/SubMenu.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ const SubMenuComponent: FunctionComponent<SubMenuProps> = props => {
210210

211211
return (
212212
<StyledHeader backgroundColor={props.backgroundColor}>
213-
<Row className="menu" role="navigation" aria-label="Page navigation">
213+
<Row className="menu" role="navigation" aria-label={t('Page navigation')}>
214214
{props.name && <div className="header">{props.name}</div>}
215215
<Menu
216216
mode={showMenu}

0 commit comments

Comments
 (0)