I want to give a title or heading to a table. For sighted users this will be hidden as the context is obvious, but for screenreaders what is the best way to mark this up? The table is for opening times so that is the title/ caption/ heading/ etc.
Share
You can use
<caption>for a title. Even though the caption tag is with the table element, it accepts block level tags, so people wrap the text in a heading tag. Thesummaryattribute can be used to provide a descriptions.See webUsability’s guide about these two topics.