W3C home > Mailing lists > Public > www-html@w3.org > December 2005

RE: <spoiler> element

From: Sunil <sunilgupta@btopenworld.com>
Date: Thu, 8 Dec 2005 00:21:47 -0000
To: "'Oskar Welzl'" <lists@welzl.info>, "'Jeremy Rand'" <jeremy@asofok.org>
Cc: <www-html@w3.org>
Message-ID: <006b01c5fb8d$60cb1690$0200a8c0@xppropc11>

Hi Jeremy,

its an interesting question about how extensible HTML should be
and whether it is appropriate to have non generic elements such
as <spoiler> defined in the standards. I'm not so sure that this
is a good idea as it then might be equally valid to have other non
generic tags defined in the standards as Oskar indicated.

Another way of looking at this perhaps is to ask whether XHTML 2
provides a generic mechanism by which custom elements can be defined.
I haven't absorbed all the XHTML documents but at first glance it
sounds like XHTMLMOD may be worth reading..

	"The modularization of XHTML refers to the task of specifying
	well-defined sets of XHTML elements that can be combined and
	extended by document authors, document type architects, other
	XML standards specifications, and application and product
	designers to make it economically feasible for content developers
	to deliver content on a greater number and diversity of platforms."


release the potential of your web server with SDPML http://sdpml.mozdev.org/

-----Original Message-----
From: www-html-request@w3.org [mailto:www-html-request@w3.org]On Behalf
Of Oskar Welzl
Sent: 07 December 2005 13:46
To: Jeremy Rand
Cc: www-html@w3.org
Subject: Re: <spoiler> element


I find it tempting to add the suggested <spoiler> to XHTML 2. I agree
that its use of "show this content only when activated by the user" is
generic enough to be handled by a XHTML element. I agree that the  CSS
+scripting solution is by far not good enough. And I have to say that
@role is not a solution at all:
It might offer a way to tell what the 'spoiler' is. But it is not a way
for an author to clearly tell a browser how to act on the element marked
@role="x:spoiler", given that scripting/CSS might not work as intended
on the UA that renders the page (custom style sheets, no scripting etc).

I have to say, though, that HTML always offered the very generic "show
this content only when activated by the user"-element:
<a href="http://www.w3.org/TR/REC-html40/struct/links.html#h-12.2">Click
here only if you want to read which element it is.</a>

This is as generic as can be - and as specific as we can allow,
probably. It is not the sophisticated "show within the current
page"-solution you want. It does not fully cover all use cases:
Disturbing medical photos within a scientific text should probably be
shown right within the paragraph that describes them, not on a separate
page. But that would be <show-disturbing-medical-pictures>, not just
<spoiler> ;-)


Am Dienstag, den 06.12.2005, 17:48 -0600 schrieb Jeremy Rand:
> I have a suggestion for an element which could be included in XHTML 2.
> This is a <spoiler> element.  This element would have the content of a
> <spoildesc> element, and a <spoilcontent> element.  The behavior would
> be that when the user agent encounters a <spoiler> element, it should
> render the content of its <spoildesc>, and provide a way for the user to
> activate the <spoiler>.  Once the <spoiler> is activated, the user agent
> should show the content of the <spoilcontent>.
> This would be useful in many situations where the user might not want to
> see certain content.  Examples are:
> Spoilers of the plot of a book or movie
> Offensive language
> Disturbing medical photos
> Pornographic or otherwise not-safe-for-work content
> The answer to a riddle
> Content with flashing lights that could cause epileptic seizures
> I'm sure there are more examples of uses for <spoiler>, but I can't
> think of any more right now.
> An example of its usage would be:
> <p>Did you hear about the cement mixer that ran over Batman and Robin?</p>
> <p><spoiler>
> <spoildesc>Activate to see punchline.</spoildesc>
> <spoilcontent>It created two new superheroes: Flatman and
> Ribbon.</spoilcontent>
> </spoiler></p>
> I know <spoiler> isn't a very good name for it, since there are other
> uses as well, but I can't think of a better name.  I know that <spoiler>
> is implemented into a forum-hosting site's posting system (I can't
> remember which site); it just displays the content of <spoiler> in
> identical foreground and background colors so that you must select the
> text to read it.  Also, I realize that this could be done using either
> scripting or links, but I think links are inappropriate, since the
> content is part of the original document.  I think scripting is
> inappropriate, since this has semantic meaning, so I think it should be
> a standard XHTML element.
> Does this proposal sound good?
> Thanks,
> Jeremy Rand
> PS: Norton E-mail Proxy says this message didn't send properly, so I'm
> sending it again.  Apologies if anyone receives two copies.
Received on Thursday, 8 December 2005 00:21:10 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:06:12 UTC