[Support request] search bar anchor title attribute

Home Forums Support search bar anchor title attribute

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1194004
    Shane

    Trying to make our website meet WCAG 2.0 for accessibility and one item that needs to be met is adding a title tag to the search bar anchor . The tag in questions looks like this

    <a href="#">

    Where / How can i add a title attribute to this tag?

    Thank you for your time in advance.

    #1194008
    Shane

    Sorry. the code is this.

    <a aria-label="Open Search Bar" href="#">

    #1194207
    Leo
    Staff
    Customer Support

    Hi there,

    Are you referring to the GP’s navigation search? If so you can modify the output with this filter:
    https://docs.generatepress.com/article/generate_navigation_search_output/

    Let me know if this helps 🙂

    #1200818
    Shane

    Trying to meet WCAG 2.0 compliance and we get notified that anchor tag for the search bar requires a title attribute. I have found and manually added a title tag to the theme generatepress/inc/structure/navigation.php file on lines 113, 322, and 357 to comply however this will reset everytime there is an update to the theme. Could you look into adding a title tag to the anchor tag for the Search bar, and/or guidence to prevent updates from overriding the manual inclusion of the title attribute?

    #1201096
    Tom
    Lead Developer
    Lead Developer

    We likely won’t add it by default, as the aria-label attribute handles it better for screen readers.

    However, I’ll look into filtering the menu item so it’s possible to add it when needed.

    #1301747
    Ricky

    I am having the same issue with Shane.

    If there’s option to add a title attribute to the code it will be perfect.

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