[whatwg] <input type="text" accept="">

Matthew Raymond mattraymond at earthlink.net
Sun Jun 11 11:38:45 PDT 2006


Anne van Kesteren wrote:
> Quoting Matthew Raymond <mattraymond at earthlink.net>:
>>    If, however, we're really just talking about adding words to the UA
>> dictionary temporarily and for a specific site, couldn't we just do that
>> with <meta> using the same format as we do with keywords?
>>
>> | <meta name="vocabulary" lang="en-us"
>> |  content="HTML5, WHATWG, WF2, WA1, WD1, CSS3-UI, TARDIS, ZPM, DHD">
> 
> That seems a bit limited. For larger vocabularies you want those files  
> to be cached, at some point you might want to provide other options as  
> well like synonyms etc., but perhaps I'm making this too complicated.

   It would be nice to have some advanced vocabulary features, but I
suspect that most web authors won't need anything more than what my
<meta> element concept provides, and my approach builds on prior web
development knowledge.

>>    Are there actually situations where different controls would need
>> different vocabulary?!?
> 
> Sure, multilingual sites.

   No, you can handle that by just using multiple <meta> elements and
the |lang| attribute:

| <meta name="vocabulary" lang="en-us" content="[US English Words]">
| <meta name="vocabulary" lang="en" content="[English Words]">
| <meta name="vocabulary" lang="fr" content="[French Words]">

   This is exactly how the HTML 4.01 spec handles keywords in multiple
language, by the way:

http://www.w3.org/TR/html4/struct/global.html#edef-META
| When several META elements provide language-dependent information
| about a document, search engines may filter on the lang attribute to
| display search results using the language preferences of the user.

   Well, we're not dealing with search engines, but you get the idea.

   Hmm... Automatically add <meta> keywords to the spell checker's
vocabulary? Nah, that wouldn't work, because in most of the cases where
you'd need such vocabulary (like forums), such keywords wouldn't make
logical sense. Furthermore, adding keywords solely for spell checker
vocabulary would distort the results from search engines. Better to have
a specific |name| in the <meta> element for vocabulary than trip up
search engines by abusing existing markup.



More information about the whatwg mailing list