WebSite X5Help Center

 
John W.
John W.
User

How can I give my Search Field a label to make Google Happy?  en

Author: John W.
Visited 1301, Followers 1, Shared 0  

When using the Google Lighthouse tool to analyze my website, it has always told me that my search field does not have a label name. How can I get a label in the HTML code for it?

Posted on the
5 ANSWERS
Aleksej H.
Aleksej H.
Moderator

Hello. Please give a link to the site page that you are checking.

You fill in these fields?

Read more
Posted on the from Aleksej H.
John W.
John W.
User
Author

Hi Aleksej,

Page = https://www.eclectic-ware.com

I am aware of these two boxes in the program, and I do have entries in them. Lighthouse seems to not accept the labels assigned from either of these boxes as the label it is expecting. Not sure what it wants.

When in Chrome and using the Lighthouse tool, the results under Accessibility show Form elements do not have associated labels. And it is referring to the search field in my header, and the one in the footer.

Read more
Posted on the from John W.
Aleksej H.
Aleksej H.
Moderator

I sent a notification about your question to the company employees, expect an answer from them here in the comments.

Read more
Posted on the from Aleksej H.
Claudio D.
Claudio D.
Moderator
Best User of the month IT

se ho capito...

penso sia la stessa cosa già evidenziata e segnalata da me in questo post:

https://helpcenter.websitex5.com/en/post/232357

Per l'oggetto "cerca" il programma genera così;

<form id="imHeader_imObjectSearch_XX_form" action="imsearch.php" method="get"><fieldset><input type="text" id="imHeader_imObjectSearch_XX_field" name="search" value="" />

Per essere a norma sarà da modificare in:

<form id="imHeader_imObjectSearch_XX_form" action="imsearch.php" method="get"><fieldset><label for="imHeader_imObjectSearch_XX_field">Cerca:</label> <input type="text" id="imHeader_imObjectSearch_XX_field" name="search" value="" />

Dove mi serviva ...  io ho post-editato

Read more
Posted on the from Claudio D.
John W.
John W.
User
Author

Hi Claudio,

I do not understand what you wrote but I do see the added line in the HTML of <label for="imHeader_imObjectSearch_XX_field">Cerca:</label>

In the HTML for my site, one of the two culprits for this note from Google has the HTML formatted like this:

</div><divid="imFooter_imObjectSearch_02_wrapper" class="template-object-wrapper"><divid="imFooter_imObjectSearch_02"><formid="imFooter_imObjectSearch_02_form" action="imsearch.php" target="_blank" rel="nofollow">https://www.eclectic-ware.com/imsearch.php">imsearch.php" method="get"><fieldset><inputtype="text" id="imFooter_imObjectSearch_02_field" name="search" value="" placeholder="Search our site" /><buttonid="imFooter_imObjectSearch_02_button">Search</button></fieldset></form><script>$('#imFooter_imObjectSearch_02_button').click(function() { $(this).prop('disabled', true); setTimeout(function(){ $('#imFooter_imObjectSearch_02_button').prop('disabled', false);}, 900); $('#imFooter_imObjectSearch_02_form').submit(); return false; });</script></div>

So Google seems right, there is no 'label.'

How do I get that label tag into the HTML code? Instructions in English please.

Read more
Posted on the from John W.