Design comparison
Solution retrospective
i had problems to change the style of the title of the content of the accordion sections. i did it with javascript but i don't know if it's the ideal solution. i'm missing some browser compatibility stuff (including mobile) and improving the way to make responsive design so i don't write too much CSS. it was really fun :3
Community feedback
- @AgataLiberskaPosted over 3 years ago
Hi @Fawkes1! Nice work on the desktop design, it looks really nice! Like you mentioned, the mobile version needs work. It's generally a lot easier to start with the mobile design and work your way up to tablet and then desktop.
I think adding the style with js is pretty standard, you just add something like 'active' class and put your expanded styles in it.
The main problem I notice with your solution though is that it's not accessible - a user wouldn't be able to expand the accordions using keyboard. The easiest way to fix it is to use button as toggleable element, here is an article about it that I found very helpful
Hope it helps!
1@Fawkes11Posted over 3 years ago@AgataLiberska thank you very much for your time and advice, I will read the article and modify it. I also started doing the mobile version first and it is easier.
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord