A11Y: Added the name of the section to collapse button for screenreader (#72010)

A11Y: Added the name of the section  to aria-label of the button to collapse or expand section in the navigation tree
This commit is contained in:
RoxanaAnamariaTurc
2023-07-21 09:54:48 +01:00
committed by GitHub
parent 01369e6aff
commit e7ad60bfc7

View File

@ -56,7 +56,7 @@ export function NavBarMenuSection({
</NavBarMenuItem>
{children && (
<Button
aria-label={`${sectionExpanded ? 'Collapse' : 'Expand'} section`}
aria-label={`${sectionExpanded ? 'Collapse' : 'Expand'} section ${link.text}`}
variant="secondary"
fill="text"
className={styles.collapseButton}