Applied Accessibility -3 Wrap Content using appropriate element

 Wrap Content using appropriate element  

 


HTML5 introduced a number of new elements that give developers more options while also incorporating accessibility features. These tags include main, header, footer, nav, article, and section, among others.

By default, a browser renders these elements similarly to div
However, using them where appropriate gives additional meaning in your markup. The tag name alone can indicate the type of information it contains, which adds semantic meaning to that content. Assistive technologies can access this information to provide better page summary or navigation options to their users.

The main element  is used to wrap the main content, and there should be only one per page. It's meant to surround the information that's related to the central topic of your page.  

<div> - groups content
<section> - groups related content
<article> - groups independent, self-contained content

 The header element  adds semantic meaning and improves accessibility . It's used to wrap introductory information or navigation links for its parent tag, and works well around content that's repeated at the top on multiple pages.

header shares the embedded landmark feature  allowing assistive technologies to quickly navigate to that content.


Note
header is meant for use in the body tag of your HTML document. This is different than the head element, which contains the page's title, meta information, etc.


The nav element is another HTML5 item with the embedded landmark feature for easy screen reader navigation. This tag is meant to wrap around the main navigation links in your page. If there are repeated site links at the bottom of the page, it isn't necessary to markup those with a nav tag as well. Using a footer tag is sufficient.

the footer element  has a built-in landmark feature that allows assistive devices to quickly navigate to it. It's primarily used to contain copyright information or links to related documents that usually sit at the bottom of a page.

source

Comments

Popular posts from this blog

ES6 : 5 Prevent Object Mutation

ES6: 1 Explore Differences Between the var and let Keywords

CSS Grid: Reduce Repetition Using the repeat Function