Site logo

Archived topic

Button Aria Label

9 replies · Started by Andy on June 30, 2020

Viewing posts 1–10 of 10

Hi, I understand there is an aria-label attribute in the buttons in GenerateBlocks, but can I get some clarification on how to set a label? For example, I know I can add text to a button e.g 'find out more', but if I want to use an aria-label for screen reader users such as “Visit the case study page”, how would I go about doing that? I have tried editing the button in html and adding an aria-label but keep getting the following message: “this block contains unexpected or invalid content”.

Hi there,

Generally an Aria field is only required if the element doesn't have a clear label/heading.

Which is why the Buttons aria field is only available in the Icon settings after an icon is added and the option to hide the text is selected.

I'll pass this onto Tom, there may be a filter to display it alway. If there isn't then you would need to use a HTML block to write your own button.

Hi there,

I agree that it should always be an option - even buttons with text can require an aria-label.

I've moved the option into the Advanced panel in 1.1 :)

That's fantastic. Thanks Tom!

No problem! Thanks for the suggestion :)

Hi! I added manually <button class="menu-toggle" aria-controls="primary-menu" aria-expanded="false" aria-label="top left"> in inc/structure/navigation.php

How can I use it from child theme?
In my child theme I create inc/structure/navigation.php but doesnt work. THX

Any chance you can open a new topic for your question?

Thanks!

Kann ich das ARIA-Label vom Logo im Menü editieren?

Hi there,

this is an old topic - can you raise a new topic where we can assist.

Hallo David,

ich habe unter der Nummer #1833724 ein neues Thema geöffnet.

This archived topic is closed to new replies.