Base apparel coming soon with CSS Grid and JS
Design comparison
Solution retrospective
Any comments are welcome.
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, great work on this one. Though I had to zoom out to see the desktop layout, are you using wide screen? Setting
1440px
as a desktop version is a no, the 1440px on the design are just the sizes where the design is made and it is not related to the breakpoint, lowering it down would be really great. The mobile state looks fine however.Some other suggestions would be:
- On desktop, the image should be occupying all height like on the design.
- Avoid using
height: 100vh
on a large container like thebody
tag as this limits the element's height based on the remaining screen's height. Instead usemin-height: 100vh
, this takes full height but lets the element expand if needed. - Also don't add
width: 100vw
as this adds an extra horizontal scroll since this doesn't account the scrollbar's size. - Your
main
tag usage is incorrect, on this one, the.wrapper
should be using themain
instead ofdiv
. This way, your main content is wrapped inside a main-landmark element. - Also, you don't need:
top transform
To align the content, on the
body
tag add:align-items: center; display: flex; flex-direction: column; justify-content: center; min-height: 100vh;
This way, it will be properly centered.
- Website-logo should be present since it is one of the meaningful element on a page and use a proper
alt
on theimg
tag of it. - Like I said,
main
should be the `. - Would be really great for the
input
andbutton
to be wrapped inside aform
tag to make it more clearer what the component is. - Your
input
tag lacks an associatedlabel
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
. - Right now, when an error appears, only sighted users will be guided that an error has shown because it is only made visually. Instead of this, do it this way, a pseudocode looks like:
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 theinput
is wrong because ofaria-invalid
and they will know what kind of error they made because of thearia-describedBy
.- If you have no reference about what I said, here is a simple accessible form that I have see the structuring and the attribute manipulations on the js. This might seem ambiguous right now, but making accessible form with these is our work^^.
- The
button
needs to havetype="submit"
, be explicit on what yourbutton
should act inside of aform
.
Aside from those, great work again on this one.
Marked as helpful0
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