Design comparison
Solution retrospective
Working on this project was very challenging for me as this is my first time of working with JavaScript on a project. I've only previously built projects with HTML and CSS. Although I had a lot of help working on this project, I am really proud that I was able to complete it. I'm proud of how great it looks. I will be taking on more JavaScript projects to help me improve.
Please check it out and let me know what you think.
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, awesome work on this one. Layout in desktop is small, did you code this while you are zoomed in though? Making it larger would be really great. Currently it is not responsive enough since if you go at around 640px going down, content are being hidden. Mobile layout though looks good.
Some suggestions would be:
- You don't need the
h1
in theheader
since there is the website-logo that will give the name. For theh1
, you should have used that inside themain
as the first text-content element. Using like a text-content of "frontendmentor tip calculator example". - Website-logo
img
should be using the website's name as thealt
likealt="splitter"
. Remember that a website's logo is meaningful so always make sure it uses the properalt
value. - Those
bill
andnumber of people
should be alabel
for theinput
below them and not a heading tag. - The dollar-icon as well the person-icon on each input should have
aria-hidden="true"
to be hidden totally for screen-reader users. - For the all the
input
used in here, you should have usedtype="number"
so that you won't have to error-checking for a value that is not a number. Use amin
and attribute as well so that there will be a minimum value to be chosen upon. - Also if you are making the
input
look like it has an error, add aaria-invalid="true"
on it so that it will be clear and you could use that as a styling hook likeinput[aria-invalid="true"]{}
- For the
button
section, maybe making each:focus-visible
state more visible since right now it is hard to tell whatbutton
am I in. - Since you used
button
in here, you could nest them inside aul
since those are "list" ofbutton
and it will give extra information to the user on how manybutton
are there. Thebutton
you would need to have anaria-live
element that will announce the certainbutton
has been pressed or selected, becausebutton
alone is not informative. I haven't tackled this challenge yet so I can't provide a sample hehe. - The custom-input needs to have an associated
label
tag on it. Since there are visible-label, thelabel
would be a screen-reader only label, meaning it would make user of likesr-only
class. The text-content should describe what theinput
needs like the value on theplaceholder
or likeadd custom value
. - Number of people
input
has nolabel
, use the same method above as well. - Again when wrapping a text-content do not just use
span
to wrap it, use meaningful element like ap
tag if it just a regular text or heading tag if it is an heading. - Another idea as well is to make use of
aria-live
as well dictating that the calculator has reset when the reset-button is toggled, just to make it more accessible. - Lastly, addressing the responsiveness since content are being hidden on that screen-width that I said above.
Aside from those, again great job on this one.
1@mikeyxxPosted about 3 years ago@pikamart As usual, thank you so much. I like how much you go into the details. I actually just felt the desktop layout was big enough for a calculator but looking at it again, I see your point. I will make all the edits you suggested.
Thank you:)
1@mikeyxxPosted about 3 years ago@pikamart Is it compulsory to use both alt="" and aria-hidden="true" for an image? Can't I just use only alt=""? and in place of <span>, can I use <small> instead of <p>?
0@pikapikamartPosted about 3 years ago@mikeyxx RIght now yes, because if you only use
alt=""
for a decorative image, VoiceOver in apple will still read the image, that is why addingaria-hidden="true"
will completely hide the element for screen-reader.When wrapping a text, always use
p
tag or other meaningful element. You can usespan
orsmall
but inside the meaningful element.<p>I am a p tag</p> <p> I have a <small> small </small> tag <p>
1@mikeyxxPosted about 3 years ago@pikamart I've made all the changes you suggested. Debugging is hell!! but I learnt a ton. Thank you. Next I will be working on the time tracking dashboard challenge hub.
1 - You don't need the
- @mikeyxxPosted about 3 years ago
Hello @pikamart, hope you are doing great. I have been working on the calculator app project and I have sort of hit a road block. I have been trying to build the toggle button that switches between the three themes but it does not seem to work and I cannot figure out what is wrong. Please can you help me look at my code when you have the time. https://github.com/mikeyxx/calculator_app
0 - @mikeyxxPosted about 3 years ago
@pikamart Hello Raymart, please checkout my first JavaScript project
0@pikapikamartPosted about 3 years ago@mikeyxx sure, but maybe after lunchtime in here, going to code first this morning^^
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