Le 08/01/2010 06:13, Nikita Popov a écrit :
I think everyone who uses PHP, JavaScript, a.s.o. knows, that at some
point the user makes something wrong and you want to throw an error
("Your email's not valid (MX-Record not set.)") or an information
("You have logged in successfully.").
Know I do this using <div id="error"> or <div id="info"> analogically.
As errors or other direct responses to user interaction are not the
same as some different text, I think there should be a possibility to
mark them up appropriately.
I first searched in the Spec for some existing elements for output,
but only found <samp> which is for sample output only.
I don't quite know which element name to use best, maybe:
<output>
<output error> / <output info(rmation)>
<output type="error"> / <output type="info(rmation)">
(The question is, what is <output>, error or info?)
What do you think?
First of all, an <output> element already exists :
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-button-element.html#the-output-element
"The output element represents the result of a calculation."
What I have understood about it is that it is a sort of opposite of the
the <input> element. In HTML 4, in order to display results of
calculations, authors used to have an <input readonly id="output"> which
was kind of absurd. The current <output> element seems to be here to
fill this gap.
Is it enough for your needs ?
David