Archived topic
Add Aria Label to Search Form in Widget Sidebar
5 replies · Started by Jason on August 8, 2021
Hello,
To remain compliant with accessibility standards, I need to add a tag/label to the search form in my widget bar. I found the code for the navigation search in another thread, but it's not applying to the search widget in the widget bar.
Is there a snippet of PHP code I can add that will solve for this?
Thanks!
Hi Jason,
Are you referring to the search widget? If so that's a WordPress widget so GP doesn't have any control.
I'd recommend checking with the WordPress support team to see if they have a snippet you can use.
Hope this helps :)
It's just the "search our site" function, in the widget bar. It should be no different than adding a snippet for the Aria tag in the navigation search which was able to be solved for another user?
Are you referring to the search widget here?
If so that's a WordPress widget so the theme doesn't control.
The navigation search is a GP option so the theme does control.
If you aren't sure, then please link me to the page in question.
I've added the page. Please see the widget on the right sidebar, above the related posts.
Yup looks like you are using a Search block which is a core widget that the theme doesn't have any control of.
Please check with WordPress' support team.
Thanks!