/programmable-search/community?hl=en
/programmable-search/community?hl=en
1/11/14
Original Poster
John Baranski

Adding Alternative Text to the Google Logo in Custom Search

In the process of checking our website accessibility (section 508) we ran across the following...
 
"Image missing alternative text"
 
<img src="http://www.google.com/uds/css/small-logo.png" class="gsc-branding-img">
 
Is there a way to add alternative text to this logo?
Community content may not be verified or up-to-date. Learn more.
All Replies (5)
TransplantLiving
11/19/14
TransplantLiving
We are experiencing the same exact problem. Please fix!!
Steve Kellman
11/15/16
Steve Kellman
11/15/16
Original Poster
John Baranski
Please try this...<script>var myCallback = function() {   //this will work if you're using jquery   //$('.gsc-search-button gsc-search-button-v2').alt = "Search Icon";   //If you're not using jquery, use this line instead   document.getElementsByClassName('gsc-search-button gsc-search-button-v2')[0].alt = "Search Icon"; }; window.__gcse = {   callback: myCallback };   (function() {    var cx = '0000000000000000000:zzzzzzzzzzzzz; //your cx code    var gcse = document.createElement('script');    gcse.type = 'text/javascript';    gcse.async = true;    gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') +        '//cse.google.com/cse.js?cx=' + cx;    var s = document.getElementsByTagName('script')[0];    s.parentNode.insertBefore(gcse, s);  })();</script><gcse:searchbox-only></gcse:searchbox-only>
Steve Kellman
11/15/16
Steve Kellman
Hi John; thanks for your quick response. We aren't using jquery; our search page uses https://www.google.com/jsapi and https://www.nmc.edu/files/js/google-search-nmc.js to process the form but I don't see code in https://www.nmc.edu/files/js/google-search-nmc.js that looks like your recommended code and am not sure where I would add the .alt = "Search Icon"  code to it if that's all that's needed.
Amy Ritterbusch
9/27/17
Amy Ritterbusch
Thank you John! The "If you're not using jquery" line worked for me on a WordPress site. No more accessibility error!
 
This question is locked and replying has been disabled. Still have questions? Ask the Help Community.

Badges

Some community members might have badges that indicate their identity or level of participation in a community.

 
Google Employee — Google product team members and community managers
 
Community Specialist — Google partners who help ensure the quality of community content
 
Platinum Product Expert — Community members with advanced product knowledge who help other Google users and Product Experts
 
Gold Product Expert — Community members with in-depth product knowledge who help other Google users by answering questions
 
Silver Product Expert — Community members with intermediate product knowledge who help other Google users by answering questions
 
Product Expert Alumni — Former Product Experts who are no longer members of the program
Community content may not be verified or up-to-date. Learn more.

Levels

Member levels indicate a user's level of participation in a forum. The greater the participation, the higher the level. Everyone starts at level 1 and can rise to level 10. These activities can increase your level in a forum:

  • Post an answer.
  • Having your answer selected as the best answer.
  • Having your post rated as helpful.
  • Vote up a post.
  • Correctly mark a topic or post as abuse.

Having a post marked and removed as abuse will slow a user's advance in levels.

View profile in forum?

To view this member's profile, you need to leave the current Help page.

Report abuse in forum?

This comment originated in the Google Product Forum. To report abuse, you need to leave the current Help page.

Reply in forum?

This comment originated in the Google Product Forum. To reply, you need to leave the current Help page.

false
Search
Clear search
Close search
Google apps
Main menu
Search Help Center
true
0
false