W3C home > Mailing lists > Public > www-validator@w3.org > November 2015

Re: Validation error on an input with type search

From: Marie Hanotte <m.hanotte@acti.fr>
Date: Mon, 23 Nov 2015 09:31:43 +0100
To: "Michael [tm] Smith" <mike@w3.org>
Cc: www-validator@w3.org
Message-ID: <5652CEEF.8030101@acti.fr>

*Hello Michael,*

Thank you very much for your answer !
I now understand better how it works.
You're also right about the "search" role that should be on the form 
(not on the input) : I misread the specifications about accessibility.

Thanks again, and have a nice day !

*Marie Hanotte *

<http://www.acti.fr> 	

*marie hanotte*
intégratrice multimedia // /interactive designer/
m.hanotte@acti.fr <mailto:m.hanotte@acti.fr>
tél. : +33 4 37 37 25 10
acti.fr <http://www.acti.fr/>
acti.fr/blog <http://www.acti.fr/blog>

	Experte Accessiweb 
<http://www.acti.fr/blog/une-introduction-a-laccessibilite-du-web/>
Renforcer la stratégie d'influence d'une marque 
<http://www.acti.fr/success-story/rcf/>

Le 23/11/2015 06:50, Michael[tm] Smith a écrit :
> Marie Hanotte <m.hanotte@acti.fr>, 2015-11-20 11:47 +0100:
>> Archived-At: <http://www.w3.org/mid/564EFA3F.6020701@acti.fr>
>>
>> When I use the validator on a HTML5 page I'm working on, I get this error :
>> *Bad value “search” for attribute “type” on element “input”.*
>>
>> I'm a bit surprised, as the reference lists *input type=search* as a valid type :
>> http://www.w3.org/TR/html-markup/input.search.html#input.search
>>
>> Is there something I am missing here ? I don't know if there is something on
>> my side that is not fitting, or if it's a bug in the validator.
>>
>> I'm sorry I can't provide a link to my page, as it's not yet publicly
> ...
>>     <form action="/content/search" method="get">
>>       <label for="Search">Votre recherche</label>
>>       <input type="search" name="SearchText" id="Search" role="search" />
> Remove role="search" and that error message should disappear.
>
> The error message being emitted for this case is suboptimal but
> unfortunately given the current design of the checker backend, it’s
> difficult to improve it.
>
> Basically what’s is saying is, “An input element with role=search can’t
> have type=search.” But what we rightly should have it saying instead is “An
> input element with role=type can’t have role=search.”
>
> Anyway, as far as I understand ARIA, there is never any need to mark up a
> type=search input element with a role attribute. Accessibility tools
> already natively/automatically recognize for what it is—a type=search input
> element has “implicit semantics” equivalent to either role=textbox or
> role=combox, depending on whether it has a “list” attribute or not.
>
> So there’s no need to put role=search on a type=search input element. In
> fact, as far as ARIA 1.0 goes, type=search input elements should never have
> any role attribute at all. I think role=search is intended for marking up
> an entire search form—e.g., at the level of the <form> element.
>
> It looks like ARIA 1.1 adds role=searchbox to mark up the equivalent of a
> type=search input element. But I’m not sure that’s supported yet in
> accessibility tools—and I think even once it is, you wouldn’t need to used
> it explicitly, because I expect the intention is that browsers would
> automatically implicitly map type=search input elements to that role.
>
>    —Mike
>
Received on Monday, 23 November 2015 08:32:15 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:18:14 UTC