Hi,
The preview looks good, but content is spilling out of the white container on mobile for me.
Looking at html you are very close to making this accessible! Just make your faq-item-link
elements into buttons and you'd be there! Even better if you then gave them aria-expanded and aria-controls attributes
With the javascript I have a couple of suggestions
- you don't need to select the icon and the paragraph. Instead, just toggle one class on the parent and let css handle the rest.
- when selecting elements in js, I suggest using a specific class for that job. I usually prefix the class name like
js-faq-toggle
or similar so I can see exactly what the js is targeting when I open the html. It's a good habit to build.
Hope these ideas help you ☺
1