WebAIM - Web Accessibility In Mind

E-mail List Archives

landmark roles, also only as anchor, valid?

for

From: Yves Serrano
Date: Jul 25, 2011 8:21AM


Hi

I'm implementing aira landmark roles on a existing html layout.
The less code I change the better.
All examples I found use the landmark for the whole container.
for example.

<div id="content" role="main">
<p>....</p>
<ul>...</ul>
</div>

I my templates there isn't always a container surrounding the content I wan't to mark as aria landmark.
Sometimes it would be easier, for the implementation, not to mark the whole container, but only to set a mark to the beginning of the relevant content.

So it would look like this.

<div id="content" role="main"></div>
<p>....<p>
<ul>...</ul>

From the semantic point of view the screenreader or other software doesn't know exactly when the content ends
or perhaps thinks the content is empty. Could this be a problem?

I tested it with the JAWS screenreader, it seems to behave the same.
Is this a no-go? Or can I use it this way?

regards
yves