mirror of
https://github.com/grafana/grafana.git
synced 2024-12-30 10:47:30 -06:00
Nav: Fix main a11y issues (#80309)
* refactor: add nav announcement for screenreader * refactor: add aria label * refactor: add more aria labels * refactor: aria labels * refactor: remove aria-labels * refactor: add aria-live * refactor: add translations * refactor: repair empty message * refactor: repair empty message * refactor: remove translation of empty message * refactor: clean up * refactor: change translation
This commit is contained in:
parent
96c4b7bf1e
commit
5b6a4e880b
@ -60,7 +60,7 @@ export const MegaMenu = React.memo(
|
||||
</div>
|
||||
<nav className={styles.content}>
|
||||
<CustomScrollbar showScrollIndicators hideHorizontalTrack>
|
||||
<ul className={styles.itemList}>
|
||||
<ul className={styles.itemList} aria-label={t('navigation.megamenu.list-label', 'Navigation')}>
|
||||
{navItems.map((link, index) => (
|
||||
<Stack key={link.text} direction={index === 0 ? 'row-reverse' : 'row'} alignItems="center">
|
||||
{index === 0 && (
|
||||
|
@ -121,7 +121,9 @@ export function MegaMenuItem({ link, activeItem, level = 0, onClick }: Props) {
|
||||
/>
|
||||
))
|
||||
) : (
|
||||
<div className={styles.emptyMessage}>{link.emptyMessage}</div>
|
||||
<div className={styles.emptyMessage} aria-live="polite">
|
||||
{link.emptyMessage}
|
||||
</div>
|
||||
)}
|
||||
</ul>
|
||||
)}
|
||||
|
@ -974,6 +974,7 @@
|
||||
"megamenu": {
|
||||
"close": "Menü schließen",
|
||||
"dock": "Menü andocken",
|
||||
"list-label": "",
|
||||
"undock": ""
|
||||
},
|
||||
"toolbar": {
|
||||
|
@ -974,6 +974,7 @@
|
||||
"megamenu": {
|
||||
"close": "Close menu",
|
||||
"dock": "Dock menu",
|
||||
"list-label": "Navigation",
|
||||
"undock": "Undock menu"
|
||||
},
|
||||
"toolbar": {
|
||||
|
@ -980,6 +980,7 @@
|
||||
"megamenu": {
|
||||
"close": "Cerrar menú",
|
||||
"dock": "Anclar el menú",
|
||||
"list-label": "",
|
||||
"undock": "Desanclar el menú"
|
||||
},
|
||||
"toolbar": {
|
||||
|
@ -980,6 +980,7 @@
|
||||
"megamenu": {
|
||||
"close": "Fermer le menu",
|
||||
"dock": "Ancrer le menu",
|
||||
"list-label": "",
|
||||
"undock": ""
|
||||
},
|
||||
"toolbar": {
|
||||
|
@ -974,6 +974,7 @@
|
||||
"megamenu": {
|
||||
"close": "Cľőşę męʼnū",
|
||||
"dock": "Đőčĸ męʼnū",
|
||||
"list-label": "Ńävįģäŧįőʼn",
|
||||
"undock": "Ůʼnđőčĸ męʼnū"
|
||||
},
|
||||
"toolbar": {
|
||||
|
@ -968,6 +968,7 @@
|
||||
"megamenu": {
|
||||
"close": "关闭菜单",
|
||||
"dock": "停靠菜单",
|
||||
"list-label": "",
|
||||
"undock": ""
|
||||
},
|
||||
"toolbar": {
|
||||
|
Loading…
Reference in New Issue
Block a user