Re: A *:body pseudo class

Tab Atkins Jr., Fri, 31 Jan 2014 20:53:57 -0800:
> On Thu, Jan 30, 2014 at 9:35 PM, Leif Halvard Silli wrote:
> You're thinking of a pseudo-element, not a pseudo-class. […] 

I do find it confusing. And it is not the first time … Thanks for your 
explanation!

> Headings are not universally the first element in their parent, so
> this proposed pseudo-element would have to generate as two elements,
> one wrapping content before the heading and the other wrapping content
> after.
> 
> I think it's best just to use an explicit element for this, which
> already exists in the form of <main>, as Ted explained.

The main element came about as an element version of the ARIA landmark 
role ”main”.[1] This means that assistive technologies may use the main 
element as ”a non-obtrusive alternative for "skip to main content" 
links”.[1]

If one was to wrap the *paragraphs* of a section inside a main element, 
the effect would be that assistive technologies could use it to 
skip/jump over the heading for that section. Something which 
sounds/seems odd.

Therefore, using the <main> element sounds like a bad idea to me. The 
<main> element is meant to *contain* headings (and non-headings too, of 
course). Whereas I am looking for something that does *not* contain 
headings. 

If, as a thought experiment, we look at <caption> as a heading, then I 
am looking for <tbody> element. And it would have been very handy to 
have it as a pseudo-element! The <tbody> is a nice analogy also because 
it may contain several columns. And that was exactly my use case: I 
need heading that spans across the entire page, while the paragraphs it 
the heading is heading for, should be split in two columns. May be 
there are other CSS features that can be used to achieve the same 
thing, but this was what seemed most natural to me ...

[1] http://www.w3.org/TR/wai-aria/roles#main

-- 
leif halvard silli

Received on Saturday, 1 February 2014 10:31:59 UTC