matthiasott / a11y-accordion-tabs

A script for an accessible accordion tabs component
MIT License
71 stars 6 forks source link

Any benefit to this compared to pure HTML/CSS solutions? #11

Open impressivewebs opened 3 years ago

impressivewebs commented 3 years ago

I'm just curious if there are any specific accessibility benefits to your script over something like this:

https://codepen.io/impressivewebs/pen/qBNqGbE

Which I created a short while back and which doesn't use any JS. It seems like it basically works the same way with the keyboard navigation...?

homoludens commented 3 years ago

I have found this reply in an older issue: https://github.com/matthiasott/a11y-accordion-tabs/issues/1#issuecomment-442812019

Hi Sebi! A late answer, but better late than never. Yes, as you already wrote, JS is needed because I set the aria-roles and tabindex attributes with it. That's the whole point of the component. ;)