Add a label to Hamburger Toggle and Close Icon

Hello!

Has somebody found a way to add a label “Menu” (and “Close”) zu Hamburger Toggle/Close Icon in the Nav Menu element to improve accessibility?

Thanks!
Dirk

1 Like

Try adding a pseudo element, :before or :after

1 Like

Thanks for the hint Bret! I am not very savvy with CSS but learning :slight_smile:

Hey @bret,

while a pseudo element works visually it does not help in terms of accessibility though: How is CSS pseudo content treated by screen readers? | Accessible Web

Best,

André

1 Like

Interesting!

Bricks adds "aria-label=“Open the mobile menu” by default to the toggle, so the Menu text is not important here for screen readers, but I guess it still confuses the screen readers, right?

Ok I tested it, VoiceOver actually is confused by the code and reads, I think it’s the page title over and over again. Is there an accessible solution?

I assumed you were only looking for decorative since the toggles already supports the use of an aria label.

Indeed I did, and it works nice, but the screenreader goes crazy when I do it with pseudo elements.

I solved this with the Bricks Extras Toggle.