You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As far as I can tell, the reason for the missing aria-label property seems to be the missing label property for component VPFlyout.vue in the VPNavBarTranslations.vue component.
I'm planning to provide a PR for this issue, if you agree. But I might need some guidance in how to provide the changes properly.
It seems like setting property label for component VPFlyout should resolve the issue. However, this value should be configurable for different locales IMO.
Reproduction
Configure vitepress for 2 locales at least to enable the "Switch Language" button in the navbar. Using a screen reader, the button is not announced properly (e.g. "popup button collapse").
Expected behavior
The aria-label property of the button element of VPFlyout in VPNavBarTranslations should be set.
sabicalija
changed the title
'Switch Language' Button does not have an accessible name.
'Switch Language' Button does not have an accessible name
Mar 3, 2023
Describe the bug
The button in the navigation for switching languages is not accessible for screen reader users.
Reviewing the HTML code reveals that property
aria-label
is not provided for thebutton
element:As far as I can tell, the reason for the missing
aria-label
property seems to be the missinglabel
property for componentVPFlyout.vue
in theVPNavBarTranslations.vue
component.I'm planning to provide a PR for this issue, if you agree. But I might need some guidance in how to provide the changes properly.
It seems like setting property
label
for componentVPFlyout
should resolve the issue. However, this value should be configurable for different locales IMO.Reproduction
Configure vitepress for 2 locales at least to enable the "Switch Language" button in the navbar. Using a screen reader, the button is not announced properly (e.g. "popup button collapse").
Expected behavior
The
aria-label
property of thebutton
element ofVPFlyout
inVPNavBarTranslations
should be set.or
Relevant HTML code should look like this:
System Info
Additional context
Following website explains the accessibility issue and possible solution in detail: https://dequeuniversity.com/rules/axe/4.4/button-name
Validations
The text was updated successfully, but these errors were encountered: