The Hgroup Element Is Useless

Vanza Setia,

Estimated reading time: 2 minutes

I am not obsessed with making every user have the same experience as another user. The most essential thing is to make sure all my users understand the content of the website. But I do not understand why web developers want to use lots of ARIA attributes and the hgroup element.

We do not need to suffer by writing the following markup:

<hgroup role="group" aria-roledescription="Joe">
  <h1>
    I am an accessibility expert with 10 years of painful experience
  </h1>
  <p aria-roledescription="subtitle">
    I have suffered, and yet I can not make a perfect website.
  </p>
</hgroup>

If we analyze the code structure, we can see lots of unnecessary things.

  • First, meaningful does not mean necessary. If an HTML heading one and a paragraph element are enough, why do we need to complicate it? Simplicity should be a priority.
  • Second, the process is long. We need to study the hgroup element, the implications for different assistive technologies, and the complexity of the HTML markup. We do not need to go through that process because it is not important. The simple one works well. So why do we need to do that?
  • Third, the content inside aria-roledescription is not visible. Why do we need to provide both visible and invisible content when visible content is enough? Visible content is the best content. The content inside a plain <p> markup works well for all users.
  • Fourth, the markup is for overthinking developers. I do not know how they think about their users' intelligence. They need to specify everything. They need to tell their users that a paragraph below the heading-one markup is a subtitle because they think their users are not smart. Also, they should redesign the website if they end up writing complex markup and need to overspecify HTML elements with ARIA attributes.

Why don't we just write the following?

<h1>Developing accessible websites for your users</h1>
<p>I develop fast websites without causing your users to suffer.</p>

With that new and simple markup, we do not need to

  • use different assistive technologies to make sure the HTML markup works consistently and works as expected; and
  • overthink about every user's environment; and
  • panic because the h1 and the p element have been around since HTML first existed and those two elements never got removed from the W3C specification; and
  • study the hgroup element and the aria-roledescription attribute because we do not use them.

What do we learn?

  • A plain heading element and a plain paragraph are enough.
  • If simple markup works well, it is great.
  • Hard work without wisdom is worthless.
  • Plain HTML works the best for all users.
  • We should respect the users' intelligence and design simple websites.
Share your thoughts

Topic(s).

Thank you for reading this The Hgroup Element Is Useless. You can subscribe to all my articles with the Articles RSS. Add this website as a preferred source on Google. If you have a positive or negative comment, please send me an email or contact me through one of my social media accounts.

Share with your network

Copy this link and send it to great people only.

https://vanzasetia.xyz/blog/hgroup-is-useless/

For you

  • Labubu

    Lisa has given an order to millions of stupid people to buy garbage.

    By Vanza Setia

    stupidity

  • Do I Hate Others?

    Do I hate transgender people? Do I hate LGBTQIA+ people? Do I even hate Democrats? You are just a step away from the answer.

    By Vanza Setia

    christianity