Interactive pricing component with custom slider and toggle
Design comparison
Solution retrospective
Hello! π
This is my solution to the interactive pricing component challenge. I constructed this using BEM and Sass.
Styling the range slider was one hell of a challenge π Thank you CSS-Tricks for the tutorial!
I tried making my solution as accessible as possible. Please go through my solution and let me know if I can make it more accessible.
I also need to get a grasp on the aria attributes, they seem interesting but I have no idea how to use them π
Any other feedback is welcome and appreciated! β
(Also, IDK why my footer is showing up in the screenshot, if anyone knows how to fix that please let me know, thanks!)
Community feedback
- @ApplePieGiraffePosted over 3 years ago
Hi, Syed Ali Mansoor! π
It's nice to see you complete another challenge (and it's good to see your custom attribution again, too)! π Well done on this one! π Your solution looks great and the slider and toggle-switch work rather well (including when using my keyboard)! π
I just suggest making sure that the word "month" changes to "year" when the toggle-switch changes the pricing plan.
And as for the footer showing up in the screenshotβI believe the design screenshot is taken of the entire page, so if you want to make sure the footer isn't shown, you could perhaps remove it temporarily, take another screenshot, and then add it back again (I've had to do that before for a solution with some JS animations). π
Of courseβkeep coding (and happy coding, too)! π
2@syedalimansoorPosted over 3 years ago@ApplePieGiraffe
Thank you for the regular comments APG!
Glad to see that you noticed the keyboard-focus styles. π
I'll work on the changes you mentioned in a bit. As for the footer, most of the time it gets cropped off without me needing to remove it, but I guess this challenge works differently! π
Thanks once again, and happy coding to you too!
0 - @mattstuddertPosted over 3 years ago
Nice work on this challenge, Syed! In addition to what APG has already said, I'd recommend adding an element that reads out the change in pageviews and prices when those elements are changed. To do this, you can use
aria-live="polite"
. I'd recommend reading up on it, as it's crucial for building accessible interfaces. Here's more about ARIA live on MDN.Keep up the great work!
1@syedalimansoorPosted over 3 years ago@mattstuddert Thank you Matt! ARIA really intrigues me but I haven't really gotten around to implementing it yet. Will definitely do so in the next challenge. Thanks for the tip once again! π
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