DEV Community

Discussion on: 5 accessibility principles you can start implementing now

elischei profile image
Eli H. Schei Author • Edited on

Lets use this current page on as an example. :)

The content of my post could be inside of an <article> element. Since the content would make sense alone - outside of the context.

But the area for the comments could be inside a <section> element since they would not make sense on their own (so not an article), and section is a way to group things that does not fit in any of the other semantic elements. This section could be placed inside of the article too - since they make sence together.

But the "Read next" component in the bottom could be another <section> , outside of the article.

I try to think that a section is a way of grouping content togeteher. Would it make sence to say "The comment section" and the "Read next section" to explain which part of the page I'm talkin about? If yes - then I use a section. (If there is not a more appropriate element to be used).

ezzabuzaid profile image

Okay that's helpful. Using as an example is brilliant šŸ‘

Thank you very much.