WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Headings or Table Captions

for

From: Jared Smith
Date: Nov 2, 2016 1:16PM


An element can only have one role, so it will be either a caption OR a
heading in this case. You can't have both with one element.

Birkir's recommendation works, but with HTML5 (and it works fine in
earlier HTML, though will cause a validation error), you can put the
heading inside the caption:
<caption><h2>Heading Text</h2></caption>.

Jared