Design comparison
Solution retrospective
Hey this is my second solution I tried to listen to feed back given by Raymart Pamplona in my first project. They suggested I use bem/sass and include a screen reader heading. I have done all those things in this project. Any feedback on how to group classify bem better specifically modifiers. Also any feedback regarding what things from sass I should use (I know I could have used variables but I didnt really know what to variabalize). Any other suggestions is much appreciated :).
Community feedback
- @pikapikamartPosted about 3 years ago
Hey, awesome work on this one. Great that I saw your solution on this:>
Layout in general looks good.
For modifiers, you usually look on the layout if there are certain components that are somehow similar which can be just altered by a modifier. If you look at it, the
proceed to payment
andcancel order
is just the samea
tag that is customized to look like abutton
.For example, both on those
a
tag, you can havecard__button
. Then on the blue button, you can add acard__button--filled
as an extra class. This way you can reuse that selector:.card { &__button {} &__button--filled {} }
Also, since this is just one component, you can just replace the
plan
to use the parent selectorcard
, so that it could becard__plan
. Since even if this were a real site, there won't be another instance ofplan
therefore it can't be reuse, where the.card
occupies the whole component as one.Other suggestions would be that:
- Do not use the
height: 100vh
on a large container, remove that from themain
and instead usemin-height: 100vh
as this is much flexible than using a fixedheight
. - The wavy background-image should be hidden by using
alt="'
and extraaria-hidden="true"
attribute on theimg
. If you are using an image, if the image is just for decoration, you must hide it all times. Only use meaningfulalt
if and only if the image adds content to the site. - The vector image should be hidden as well since it is just a decorative image. Usually, vector images like those are hidden because they are just vector images. If you have for example a gallery on site, you could make use of descriptive
alt
values for those because you are showcasing them, but cases like these, images are just decorative. - Music icon should be hidden as well.
- The
annual plan
should use a heading tag, since it describes what is the section is all about, hence the pricing plan of the user. - Also, do not use just use
strong
tag to wrap a text, usep
tag on them. Always usep
tag or any other text-content html elements for text,strong
span
if you use them, make sure that they are inside a meaningful element likep
tag. - When you use
section
element, it always expect a heading tag inside it. Your.card__footer
could just be adiv
. - Lastly, the
.attribution
should be inside afooter
tag. As you can see in your issues, all contents must be inside landmark elements.header, main, footer, aside, nav
those are landmark elements and contents needs to be inside a landmark elements to be properly navigated by users.
Aside from those, great work again on this one.
Marked as helpful1 - Do not use the
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