Design comparison
Solution retrospective
I would like feedback on my work especially on how to make the reset button active when the percentage button is on focus. Thanks in anticipation.
Community feedback
- @A-amonPosted over 3 years ago
Hello! It's a job well done~ The responsiveness looks good too.
I have a few suggestions:
-
Have a label tag or aria-label attribute for each input elements so that, the users know what they are for via screen reader.
-
I think you might need an alt for your splitter logo. At least, users using screen reader will know what's the app's name.
-
Regarding your question, I think you could add an event listener to the percentage button then, add a class to your reset button when the percentage button is clicked. Prior to the class being added, set the pointer-events:none to reset button so that it can't be clicked. After adding the class, unset the pointer-events and make it looks clickable via CSS e.g. changing the background-color.
-
Add/remove classes instead of directly setting CSS properties in JS so that the code looks more organized. For e.g. adding .error class to show error-related styling, etc.
Marked as helpful0 -
- @MimieveshofuoPosted over 3 years ago
Thanks for the feedback.
0@A-amonPosted over 3 years ago@Mimieveshofuo Glad to help!
P.s. There's a Reply button/link on the top right of the comment.
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