🎉 Happy 4th of July! Get 15% off GP Premium with the discount code: 4THOFJULY2020

[Resolved] Button Aria Label

Home Forums Support Button Aria Label

  • This topic has 4 replies, 3 voices, and was last updated 1 week ago by Tom.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1346756
    Andy

    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”.

    #1346847
    David
    Staff
    Customer Support

    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.

    #1347315
    Tom
    Lead Developer
    Lead Developer

    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 🙂

    #1347342
    Andy

    That’s fantastic. Thanks Tom!

    #1347507
    Tom
    Lead Developer
    Lead Developer

    No problem! Thanks for the suggestion 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.