Design comparison
Solution retrospective
Any feedback is welcome
Community feedback
- @pikapikamartPosted almost 3 years ago
Hey, awesome work on this one. The desktop layout looks fine on my end, it just have a small white-space on the top part making the image not occupy the full height. For responsiveness, currently when you go into like 1005px upper, you will notice that the image is now overlapping the text on its left side. For mobile state, it looks great but I think 0px-1000px for the whole mobile state to occupy is too big.
Some other suggestion would be:
- It would be great to have a base styling of this:
html { box-sizing: border-box; font-size: 100%; } *, *::before, *::after { box-sizing: inherit }
This way, handling an element specially its size will be easier because of the
box-sizing
- Change the
div
that holds the website's logo to useheader
, this way it will be its own landmark. - When using
img
tag, do not forget to add thealt
attribute, whether the value is empty or not. Because by not including it, screen-reader will instead read the source path of the image which you don't want. So always include it. - Also, just to make sure that you use proper
alt
. On the website logo or in any site that you make, a website logo'salt
should be the website's name. On this one, it should be usingalt="Base Apparel"
. - Don't change the
main
tagdisplay
tounset
.unset
value removes or revert right? But for this, you don't really need to change thedisplay
just let it use its default value and also, you are using it as well on themargin
width
andheight
of themain
as welll. - Your
input
right now currently lacks associatedlabel
to it or anaria-label
to which will define the purpose of theinput
element. Always include it so that user will know what they need to give on eachinput
. Make sure thatlabel
is pointing to theid
of theinput
as well. - A
label
tag doesn't need to use aname
attribute.name
is used oninput
tags so that there will be groupings if it is a radio button or make it easier to extract values oninput
tags. - The error-message should not be using the
aria-live
on this one. Thearia-live
element could just be an independent element like ap
tag. Then you use this element to announce something, maybe on what is the status of theform
submitted by the user. - Your submit-button should have either
aria-label
attribute orsr-only
text inside it which defines what thebutton
does. It could be likearia-label="submit form"
. - Also, remember that when a
button
is placed inside aform
element, it defaults totype="submit"
. So imagine if you have a close-button inside theform
without specifyingtype="button"
clicking the close-button will submit theform
. Be aware of this kind of scenarios. For this, usetype="submit"
on thebutton
so that it will be clear. - The
img
inside thebutton
is only decorative. Decorative images should be hidden for screen-reader at all times by usingalt=""
andaria-hidden="true"
to theimg
tag or onlyaria-hidden="true"
if you are usingsvg
instead ofimg
tag. - For a proper linking of error-messages to their respective
input
fields, you can look at this pseudocode on how it should be:
if ( input is wrong ) input.setAttribute("aria-invalid", "true"); input.setAttribute("aria-describedBy", id of the error-message); else input.removeAttribute("aria-invalid"); input.removeAttribute("aria-describedBy");
The error-message element should have an
id
attribute which is referenced by thearia-describedBy
attribute on theinput
element. By doing that, your user will know that the input is wrong because ofaria-invalid
and they will know what kind of error they made because of thearia-describedBy
. Have a look at this simple accessible form snippet that I have If you have any question about this one, just let me know okay^^.- Lastly, maybe adjusting breakpoint and dealing with the issue that I mentioned at the beginning about the hero-image overlapping the hero-text.
Aside from those, great job again on this one.
Marked as helpful1
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