Design comparison
Solution retrospective
All feedback is highly appreciated!
Community feedback
- @AlexKMarshallPosted about 3 years ago
The calculation looks correct, and visually the styling looks good.
But there are some problems with the HTML. The biggest problem is the tip percent buttons. They should be real
button
elements (or<input type="radio"/>
). By faking buttons with div elements and a click handler, they become completely inaccessible to anyone using a keyboard or other non-mouse method of interacting with the page. If we want an element to execute some javascript when we click on it, it must be a button element, and it must have suitable:focus-visible
styles.The app starts with 15% selected, but that's not clear from the UI, we can use an
aria-pressed
state on the button, or the value of the radio button, depending on approach, to style the currently active percentage.It's missing some field validation. Currently I can enter a negative number for the bill amount.
Marked as helpful2@cheepmanzeePosted about 3 years ago@AlexKMarshall Thank you very much, I'll probably rework this once again. Appreciate your 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