From the course: React: Accessibility

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Semantic React tags

Semantic React tags - React.js Tutorial

From the course: React: Accessibility

Start my 1-month free trial

Semantic React tags

- [Instructor] We'll learn about semantic tags used in React and how they can be used to provide accessibility features. In the previous video, we reviewed that semantic HTML tags are an element that clearly describes this meaning to both the browser and the developer. A common way of wrapping code in HTML would be to use a div tag. The issue with this is that when wrapping divs within divs, it becomes harder for screen meters to find valuable information on the webpage. This is because adding wrapper divs to React's virtual Dom would eventually be rendered in the main Dom as non semantic HTML. React has its own semantic tags. The most prominent semantic tag being fragments. Fragments let you group of lists of children without adding extra nodes in the Dom. The way React fragments help improve semantic JSX is by eliminating unnecessary div tags on the Dom tree. It allows us to write more semantic HTML which is the basis…

Contents