smashingmagazine / redesign

Reporting bugs and weird issues on the shiny new Smashing Magazine.
https://next.smashingmagazine.com
41 stars 2 forks source link

HTML of main menu is inaccessible #317

Open PimDerks opened 6 years ago

PimDerks commented 6 years ago

- Do you want to request a feature or report a bug?

Bug.

- What is the current behavior?

Items in main navigation have multiple role=presentation attributes, causing them to be hidden in AT. I also do not consider it correct to using headings in the menu, as they simply are not headers...?

Heydon commented 6 years ago

Hi @PimDerks,

The role="presentation" attribution does not hide the content in AT, only the semantics. You are correct that <h2> is not a correct element in a navigation menu, hence role="presentation" to suppress its semantics 👍

PimDerks commented 6 years ago

Thanks for the comment! I wonder why they would suppress semantics, instead of just using a div or span instead of the h2 - or using an empty alt on the image...?

Heydon commented 6 years ago

I don't know why it was used in the first place, but the easiest way for me to fix it was to use role="presentation". That way, I didn't break the CSS.

vitalyfriedman commented 6 years ago

Mmm, so what would be the ultimate recommendation here, @Heydon @PimDerks? :-)

Heydon commented 6 years ago

@vitalyfriedman It's fine as it is. But if we can replace the <h2>/<figure> stuff with <span>s without breaking anything, that's a bit better.

vitalyfriedman commented 6 years ago

Adding it to my to-do list. Thanks for reporting it! @PimDerks @Heydon Will adjust after handling critical issues!