ccsCoder / image-accordion

A highly accessible image accordion.
3 stars 1 forks source link

A11y: 'h2' heading skipped #2

Open namansancheti opened 3 years ago

namansancheti commented 3 years ago

The h1 tag is followed by the h3 tags - this can be confusing, since h2 is skipped.

Quoting from the W3C page:

Skipping heading ranks can be confusing and should be avoided where possible

Ref: https://www.w3.org/WAI/tutorials/page-structure/headings/#heading-ranks

ccsCoder commented 3 years ago

Quite right. This error popped up in Lighthouse as well. However if you look at Accordions Wai Aria page you'll see that they recommend a h3 for the accordion panel header.

We can add a visually hidden one but I do not see any utility for that.

Thoughts?

namansancheti commented 3 years ago

Quite right. This error popped up in Lighthouse as well.

Oh! okay.

However if you look at Accordions Wai Aria page you'll see that they recommend a h3 for the accordion panel header.

Correct - did come across that.

We can add a visually hidden one but I do not see any utility for that.

Yeah - will have to explore why specifically h3 is recommended, for the accordion panel header.