Fylo landing page with two column layout
Design comparison
Solution retrospective
Hi folks,
Currently, the website is optimized only for desktop and tablet versions. The Mobile version seems to be complicated. I have a few questions tho.
-
The header, central part, and footer are not wrapped in a single container. Instead, I have made them as individual items. Is it good practice?
-
What is the correct way to add a circle border to the social media icons?
Open to other feedback as well.
Thanks for reviewing my work!
Community feedback
- @vanzasetiaPosted about 2 years ago
Hi, Sarvotham Gowda! 👋
If the site is not optimized for mobile then I would recommend trying to write the styling for the mobile device first. This approach is known as the mobile-first approach. Not only, it will make sure that the site looks great on mobile but also it often leads to shorter and better performance code. Also, mobile users won't be required to process all of the desktop styles.
Regarding your first question, for the
header
and thefooter
, those landmarks have wrapped the correct page content. But for themain
landmark, it should wrap the rest of the page content. The rule to follow is to make sure that all page content lives inside the correct landmark element.For your second question, in general, a circle can be created with following the conditions:
- The element must have the same amount of
width
andheight
. - The element must have
border-radius: 50%
. - In this case, you can add a
border: 1px solid #fff;
.
For example:
/** * I used flexbox to make the icon * in the middle of the circle. */ .social__link { display: flex; align-items: center; justify-content: center; border: 0.0625rem solid #fff; border-radius: 50%; height: 3.125rem; width: 3.125rem; }
That's it! I hope this helps! 🙂
Marked as helpful3@sarvothamgowdaPosted about 2 years ago@vanzasetia thanks for the feedback this really helps!
0 - The element must have the same amount of
- @PhoenixDev22Posted about 2 years ago
Hi Sarvotham Gowda,
Congratulation on completing another frontend mentor challenge, I have some suggestions regarding your solution , if you don't mind:
HTML
- The interactive element should be around the element like this
<a href="#"></ <img src="./images/logo.svg" alt="Fylo" width="166" height="49">a>
. The same for this<li><ahref="#"> Features </a> </li>
- You can use the website's name as an alternate text for the logo. You may set
alt=”Fylo"
, it’s better to place it inside the<nav>
as it does navigate the user .
- The type of
Get Started
button issubmit
, as it submits a form.
- Forms with proper inputs and labels are much easier for people to use. To pair the label and input, one way is an explicit label’s
for
attribute value must match its input’sid
value. Input fields without accompanying labels can lead to accessibility issues for those who rely on screen readers. If a screen reader comes across an input field without a label it will try to find some accompanying text to use as the label. (To hide the label visually but present for assistive technology, you may usesr-only
class ).
- look up a bit more about how and when to write alternate text on images. Learn the differences between decorative/meaningless images vs important content . For decorative images, you set an empty
alt
to it with anaria-hidden=”true”
to remove that element from the accessibility tree. This can improve the experience for assistive technology users by hiding purely decorative images.
- Profile images like that avatar are valuable content images, not decorative .For the alternate text of the avatar testimonial should not be kyle-pic. You can use the avatar’s name
alt=" kyle burton"
. The alternate text should not be hyphenated, it should be human readable.
- You may use like to use
<address>
tag to wrap the contact informationclass="contact"
for the author/owner of a document or an article (email and phone number). By adding semantic tags to your document, you provide additional information about the document, which aids in communication.
- When you use the
<nav >
landmark to wrap the footer navigation , you should addaria-label=”secondary “
oraria-label=”footer”
to it . A brief description of the purpose of the navigation, omitting the term "navigation", as the screen reader will read both the role and the contents of the label. Thenav
element in the header could use anaria-label="primary"
oraria-label=”main”
attribute on it. The reason for this is that, you should add thearia-label
for a nav element if you are using the nav more than once on the page.you can read more in MDN
- Instead of using a generic div to wrap the social links
class="social-media-handles
, you put your links within an unordered list structure so that a screen reader will read out how many things are in the list to give visually impaired users the most information possible about the contents of the navigation.
- Links must have discernible text. The social links wrapping the icons must have
aria-label
orsr-only
text indicate where the link will take the user. Your icons are purely decorative, you'll need to manually add an aria-hidden attribute to each of your icons.
Aside these, you did great work. Hopefully this feedback helps.
Marked as helpful1@sarvothamgowdaPosted about 2 years ago@PhoenixDev22 thanks for the feedback this really helps!
0@PhoenixDev22Posted about 2 years ago@sarvothamgowda
Glad to hear that it was helpful. Happy coding!
0 - The interactive element should be around the element like this
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