@ApplePieGiraffe
Posted
Hey, Ismail Hammaini Farhane / Tux3er! 👋
Well done on this challenge! 👍 I like the extra touches that you added to your solution! 👏
It would be good to use button
or input
elements for the options in the card component. You are currently using tabindex
to make the li
elements keyboard-focusable, which is generally discouraged as using semantic, interactive elements from the start is a better way to go. The options would be a good opportunity to use radio input elements since only one option can be selected at a time. You can also wrap the input elements and submit button in a form
element and collect the form data by listening for the submit
event on the form in your JS. 😉
Adding some form validation to the card would be a nice idea, too, in order to make sure that users select an option before submitting the form. 🙂
Hope you find this helpful. 😊
Keep coding (and happy coding, too)! 😁
Marked as helpful