WebSite X5Help Center

 
John W.
John W.
User

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

Autor: John W.
Visitado 1305, Seguidores 1, Compartilhado 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?

Publicado em
5 RESPOSTAS
Aleksej H.
Aleksej H.
Moderator

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

You fill in these fields?

Ler mais
Publicado em de Aleksej H.
John W.
John W.
User
Autor

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.

Ler mais
Publicado em de 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.

Ler mais
Publicado em de Aleksej H.
Claudio D.
Claudio D.
Moderator
Usuário do mês IT

se ho capito...

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

https://helpcenter.websitex5.com/pt/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

Ler mais
Publicado em de Claudio D.
John W.
John W.
User
Autor

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.

Ler mais
Publicado em de John W.