Skip to main content
Topic: HTML main tag and a11y (Read 1551 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

HTML main tag and a11y

I noticed that your < main > tag is  nested inside #wrapper and #main_content_section. This is "hierarchically-correct" according to W3 specs, but WebAIM says:
Quote< header >, < main >, and < footer > must be direct children of < body > to be exposed to screen readers. They cannot be nested within other container elements.
Which is a bit of a nuisance. With a forum it more or less means you either bung the news and linktree into < main >, or you find somewhere else for them.

I've gone with just bunging the news and linktree in. I figure that, in practice, the lower linktree and all sorts of minor shiznit (post buttons, etc, etc) are going to have to end up in there anyway, so no point getting too persnickety about the top linktree and the news being in there either. The skipnav link can still go straight to #main_content_section, so no dramas there.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: HTML main tag and a11y

Reply #1

Well that kind of stinks:nose:

It not flagging that issue when I run the wave analyzer, not that it is infallible, (much like the html validator).  I'll move it around and see what breaks when I do that. 

I've been cleaning up some of the other low hanging fruit that the validator spits out, some of it is a bit of a circle jerk, but some is just easy.

 

Re: HTML main tag and a11y

Reply #2

Ok, if WAVE can still see the main tag where it was, it may be that screen readers have improved since WebAIM wrote their article. Not sure. It's just something I noticed when reading their site. :)
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P