Re: [whatwg] Footnotes, end notes, side notes

2008-04-28 Thread Křištof Želechovski
Although providing the footnote as a tool-tip 
seems appealing at the first glance, 
it is not exactly how it should be done.
Footnotes are commonly used for bibliographic references; 
using the title attribute seems to be a non-solution in this case.  
Text of such footnotes cannot be copied 
and they cannot contain hyperlinks.

Chris

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Hickson
Sent: Monday, April 21, 2008 2:19 PM
To: WHATWG List
Subject: Re: [whatwg] Footnotes, end notes, side notes


On Sun, 5 Nov 2006, Martin Atkins wrote:

 It seems to be that the visual continuous media equivalent of a footnote 
 is something like a tooltip or pop-up box containing some text. It'd 
 only be displayed when the user requests it, by clicking on or hovering 
 over it. Paper documents permanently display the footnotes only because 
 of the limitations of the media.
 
 Doing click-to-view footnotes with current CSS is tricky, but doing 
 hover-to-view is reasonably straightforward using some trickery with the 
 :hover pseudo-class and display:none, as long as the footnote content is 
 inline.
 
 Reverting to traditional footnotes for print media based on the same 
 markup is not straightforward, however. The CSS3 support for shuffling 
 elements about would do it, but we're not there yet.

I think the CSS stuff is less of a big deal than you make it out to be, 
but I agree in general with those comments.


On Wed, 1 Nov 2006, Michael(tm) Smith wrote:
 
 Whatever browser implementation poverty there might be in handling of 
 the title attribute, the fundamental deficiency is that basing a 
 mechanism for displaying annotations on an attribute value limits the 
 content of the annotations to text. Annotations that can't even contain 
 simple character formatting are useless for anything except the simplest 
 purposes.

All good points.



  One thing to consider when looking at footnotes is would the title= 
  attribute handle this use case as well as what I'm proposing?. If the 
  answer is yes, or almost, then it's probably not a good idea to 
  introduce the new feature.
 
 I really don't think so.  There are accessibility and usability issues
with
 the title attribute.
 
 * Screen readers don't read the title attribute by default.
 * Tooltips are inaccessible (in current implementations) to keyboard
users,
 they require hovering with a mouse.
 * Users have no clear way of identifying which content has a tool tip,
except
 for maybe abbr and acronym (which get a dotted border in FF).
 * It's also limited to plain text, when even the example from wikipedia
 contains additional markup.
 
 The first 3 issues could possibly be addressed by changing the 
 rendering, but how do you identify a regular title attribute from one 
 intended to be a footnote?  Would it be appropriate for all of them to 
 be treated as footnotes? I don't think so.

Wouldn't it?


 When an author cannot got hold of a work herself, she must sometimes 
 cite a citation of that work in second work. This is what the 
 abbreviation cit. is for. And sometimes a citation refers to more than 
 one version of a work. Here's an example out of the Oxford Style Guide:
 
 J. D. Denniston, /The Greek Particles/ (Oxford, 1934; citations are from 
 the 2nd edn., 1954).
 
 Without more clarity (and that partly means examples) on how cite / 
 should apply to the complexity of real academic citations, I'd avoid 
 making the assumption that cite / cannot contain cite / -- for now.

cite is now defined to mean title of work.





Re: [whatwg] Footnotes, end notes, side notes

2008-04-22 Thread Michel Fortin

Le 2008-04-21 à 8:19, Ian Hickson a écrit :


On Tue, 31 Oct 2006, Michel Fortin wrote:


Interesting. If I understand well, this CSS proposal would allow a  
note
inserted in the middle of a paragraph to become a footnote. For  
instance

this:

   pThis paragraph has a footnotefootnoteThis is a footnote/
   footnote./p

could be presented like this (where 1 is presumably superscript and
linked to the footnote):

   This paragraph has a footnote1.
   __
   1.  This is a footnote.

That'd very interesting. But the markup is poor for backward
compatibility and makes it difficult to include more than one  
paragraph

in a note. So I'm going to propose an improvement to this markup.

(For the next example: fn = footnote; fnref = footnote  
reference.)


What is needed to solve the backward compatibility problem is a  
second
way of indirection, so that the footnote can be placed elsewhere.  
This

is the first piece of the puzzle:

   pThis paragraph has a footnotefnref for=my-footnote/ 
fnref./p


   fn id=my-footnote
 pThis footnote can contain block-level elements!/p
   /fn

In this example, a reference to the footnote is found in the  
paragraph,
and the footnote content is elsewhere in the document. The browser  
would

be in charge of numbering the marker correctly (or not, if the
stylesheet says so) and to put the referenced footnote in a list with
the other footnotes in the order they are reference.

Notice the empty content of fnref? That's substitution content for
backward compatibility: if you put a link to the footnote within the
fnref element, when displaying things as footnote the actual  
content

is substituted by the marker, but footnote-unaware browsers will show
the link. In the previous case, the fallback content for the  
reference

marker could have been:

   supa href=#my-footnote1/a/sup

Since footnotes are referenced and reordered, you're free to place  
them
wherever you want. If you care about backward compatibility, you  
should
put them all together at the end of your article and there you have  
your

list of footnotes. Footnotes without reference are considered to be
referenced from where they are in the source. Or if you want them  
to be

styled as sidenotes, just put the notes before or after the paragraph
they relate to in the source, or even inline inside paragraphs  
(although
inline footnotes should be restricted to inline content), and hide  
the

marker.

The last piece of the backward compatibility puzzle is the fnl
(footnote list) element. This element is optional, but if present,
preceding footnotes inside the same sectioning element will be  
relocated
inside this element. fnl would be styled as an ordered list, and  
its

list items would be footnote elements (fn).

   pThis paragraph has a footnotefnref for=my-footnote

supa href=#my-footnote1/a/sup/fnref./p


   fnl
   fn id=my-footnote
 pThis footnote can contain block-level elements!/p
   /fn
   /fnl

I suggest that footnotes be relocated at the end of the first  
article
element, or to the first fnl element following them in the  
source. It
goes without saying that footnotes already inside fnl stay where  
they
are, although they should be reordered in the order they are  
referred to

in the text.


At this point, why not simplify the markup and remove the fnref? And
turn the fnl and fn into a section and some divs or  
something and
you have backwards compatible markup that already does everything we  
need

without sacrificing any of the stylability...


The idea of relocating the content is that one may specify in some  
form from a stylesheet how the notes should be rendered -- sidenotes,  
footnotes, endnotes would all use the same markup with a different  
style. (By relocating I mean it should appear somewhere else in the  
rendering three, not moved to another element in the DOM by the way.)


The reason I came with this somewhat complex proposal is to satisfy  
the following cases which cannot be completely fulfilled with current  
markup:


1.  Permitting notes as actual footnotes (not endnotes) for paged media:
given some styling, the browser relocates footnotes at the end of  
each

page.
2.  Permitting notes with any content -- paragraphs, lists, code blocks
(precode), etc. -- to degrade gracefully as endnotes, or  
sidenotes
(given proper styling and placement in the source), in current  
browsers.
3.  Permitting footnotes to be placed near the context they're  
referenced
from when you don't care about backward compatibility (easier  
editing).
4.  Permitting footnotes to be rendered incrementally on paged media  
when
the content is defined before the marker (or almost-incremental  
if the
content of a footnote immediately follows the paragraph with its  
marker).


That said, I certainly acknowledge the argument that the feature may  
not be compelling enough for implementors to bother with a proposal of  
this complexity, and it is possible 

Re: [whatwg] Footnotes, end notes, side notes

2008-04-21 Thread Ian Hickson

I haven't added any new markup for footnotes or end notes. Side notes 
without callouts in the main flow are possible with aside.

For footnotes and end notes there have been a number of proposals, such 
as the following (and variants on them):

   text text footnote note note /footnote text text

   text text a href=#fn1 target=footnote1/a text text
   footnote id=fn1 note note /footnote

   text text a href=#fn1 rel=footnote1/a text text
   div id=fn1 note note /div

   text text fn xref=fn1/ text text
   footnote id=fn1 note note /footnote

   text text ref to=fn1fallback text text
   footnote id=fn1 note note /footnote

None of these are really compelling, in my opinion. None have the 
awesome factor that really makes it likely that UAs will ever implement 
them well. None are especially compellingly better than the currently 
available options:

   span title=note notetext tex text text/span

   ptext text/p
   aside note note /aside
   ptext text/p

   text text a href=#fn1 id=r1 class=footnote1/a text text
   div id=fn1a href=#r1uarr;/a note note /div

I have added a section showing examples of how to use these.

Having said that, here are more detailed comments in response to the 
feedback provided:

On Tue, 31 Oct 2006, Michel Fortin wrote:
 
 I'm all for a syntax for footnotes (and sidenotes, and endnotes). The 
 question is what do we want a footnote markup to accomplish? Minimally, 
 it should associate a note with its context so that you know there is a 
 note and that you can refer to it if you want. This definition encompass 
 a couple of methods to do such notes that are in use currently, in HTML 
 and elsewhere.
 
 1. One of them, mostly used with sidenotes, is to have the note directly 
 in the text:
 
 pSome text span class=sidenotethis is a sidenote to put
 in the margin/span and some other text./p
 
 With pretty trivial CSS, you can then put all the sidenotes in the 
 margin. With some javascript[1], you can also create a list of footnotes 
 at the bottom of the page. This method is also consistent with how word 
 processors treat footnotes: as distinct pieces of text inserted 
 punctually at some place in the main text but which are rendered 
 elsewhere.
 
  [1]: http://www.brandspankingnew.net/specials/footnote.html

With aside, you can do this, though not directly in a paragraph. If you 
use more markup, you can make this work today with fallback:

   pSome text span class=sidenotespan(/spanthis is a sidenote to 
   put in the marginspan)/span/span and some other text./p

It might require some tweaking, but you get the idea.


 2. Some syntaxes meant to be written directly by humans, like Latex, 
 also allow you to defer the note content until a later time to make 
 things more readable. In these cases, you put a marker in the text, then 
 associate the marker with the note content which can be placed elsewhere 
 in the document. This make the text more readable. My own text-to-HTML 
 tool (PHP Markdown Extra, semi-private beta version 1.1) use such a 
 syntax:
 
 Paragraph linked to a footnote[^1].
 
 [^1]: This is the footnote content.
 
 Some other paragraph.
 
 I'm not aware of anyone doing this for footnotes or sidenotes in HTML; 
 it doesn't seem very practical to style either.

You could do this with aside:

   pParagraph linked to a footnotea href=#fn1 id=r1[1]/a./p

   aside id=fn1a href=#r1[1]/a: This is the footnote 
   content./aside

   pSome other paragraph./p


 3. The last method of expressing footnotes in HTML is to create markers 
 in the text and put the footnotes in an ordered list at the bottom of 
 the page. For instance, my text-to-HTML tool generates this markup from 
 the above example:
 
 pParagraph linked to a footnote
supa id=fnref:1 href=#fn:1 rel=footnote1/a/sup.
 /p
 
 pSome other paragraph/p
 
 div class=footnotes
 hr /
 
 ol
 li id=fn:1
pThis is the footnote content.
   a href=#fnref:1 rev=footnote↩/a
/p
 /li
 /ol
 /div
 
 This provides a trivial way to style footnotes as footnote, it'll even 
 looks good unstyled and is completely backward compatible.

Indeed. (Though I might quibble on the precise structure.)


 Before defining a markup for footnotes or sidenotes, I think it'd be a 
 good idea to see what goals the syntax should fulfill. Is backward 
 compatibility one of them, or should we always rely on the browser 
 capabilities to relocate footnotes where they should be, or should we 
 allow both?

Both seem good.


 Some other things to take into consideration:
 
 * Footnotes should probably not be allowed to escape their enclosing 
 article element. For instance, if you have a couple of weblog articles 
 on your main page, each article having some footnotes, it'd probably not 
 be a good idea to have footnotes from all articles mixed together in the 
 same list.

Makes sense. You'd want footnotes scoped to article, and end notes 
scoped to the