Improve accesibility of navbar

- Description of logout button is read once
- SCM-Manager logo is better decribed for assistive technologies
- The state of the mobile menu is better accessible
This commit is contained in:
Philipp Ahrendt
2024-11-15 17:09:55 +01:00
parent f2a5ff2d09
commit 265ba2151a
5 changed files with 11 additions and 4 deletions

View File

@@ -0,0 +1,6 @@
- type: fixed
description: Enhanced alt-text describing logo of SCM-Manager in nav bar
- type: fixed
description: Trigger and menu for mobile mode use correct aria attributes
- type: fixed
description: Logout-button exposes one description to assistive technologies

View File

@@ -105,7 +105,7 @@
"alt": "Lade ..."
},
"logo": {
"alt": "SCM-Manager"
"alt": "Logo des SCM-Manager: abstrahierter, geometrischer Schmetterling"
},
"primary-navigation": {
"repositories": "Repositories",

View File

@@ -106,7 +106,7 @@
"alt": "Loading ..."
},
"logo": {
"alt": "SCM-Manager"
"alt": "Logo of SCM-Manager: an abstract, geometrical butterfly"
},
"primary-navigation": {
"repositories": "Repositories",

View File

@@ -28,7 +28,7 @@ export const headerButtonContentClassName =
const HeaderButtonContent: FC<Props> = ({ burgerMode, icon, label }) => (
<>
<Icon title={label} name={icon} color="inherit" className={burgerMode ? "is-size-5" : "is-size-4"} />
<Icon name={icon} color="inherit" className={burgerMode ? "is-size-5" : "is-size-4"} />
<span>{" " + label}</span>
</>
);

View File

@@ -121,7 +121,8 @@ const NavigationBar: FC<Props> = ({ links }) => {
</LogoItem>
<button
className={classNames("navbar-burger", { "is-active": burgerActive })}
aria-expanded="true"
aria-haspopup="menu"
aria-expanded={burgerActive}
onClick={() => setBurgerActive((active) => !active)}
aria-label={t("primary-navigation.navbarBurger")}
>