w3c / validator-suite

Validator Suite
Other
56 stars 23 forks source link

On forms make title and placeholder strings and attributes optional #349

Closed vivienlacourba closed 10 years ago

vivienlacourba commented 10 years ago

For example today on the login form we have title="l_email.title" as the string l_email.title was not set.

<input id="l_email" type="email" required="" value="" title="l_email.title" placeholder="Email" name="l_email"></input>

Instead in the template file if the title and placeholder string is missing the corresponding attribute should not be added.

So in case of the login form if l_email.title is not specified the generated markup would be:

<input id="l_email" type="email" required="" value="" placeholder="Email" name="l_email"></input>
tgambet commented 10 years ago

No such logic can nor should be embedded in a language file. I dot not have access to whether the string is defined in the language file. A title and a placeholder are mandatory for all relevant inputs (text, url, email). Also, the title will be the content of the help tooltip (#256).