Skip to content

alberto-rj/article-preview-component

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Frontend Mentor - Article preview component solution


Screenshot

This is a solution to the Article preview component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.

Table of contents

Overview

Motivations

Users should be able to:

  • View the optimal layout for the component depending on their device's screen size
  • See the social media share links when they click the share icon

Screenshot

Mobile version

Collapsed menu
Expanded menu

Desktop version

Collapsed menu
Expanded menu

Links

My process

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • CSS Flexbox
  • Mobile-first workflow
  • Browser-based JavaScript

Challenges faced

Responsivity

  • Problem: Adapting the component to different devices (mobile, tablet, desktop) was a challenge.

  • Solution: CSS Flexbox and CSS Media Queries were used to create a responsive layout. The component was tested on various devices and screen sizes to ensure a good user experience.

Accessibility

  • Problem: The component's low accessibility for visually impaired users was an issue.

  • Solution: To ensure the component's readability for all users, colors were adjusted based on accessibility tests conducted using tools such as Accessibility Insights and Lighthouse. The alternative colors (#67788f, #ffffff) offer better contrast and make it easier to read for people with low vision.

Performance optimization

  • Problem: Ensuring fast loading times and smooth performance was a major concern, especially with CSS and JavaScript files.

  • Solution:

    • The CSS was minified.
    • The defer attribute was used to load the script.

Continued development

  • Accessibility: Make the social media sharing menu accessible for keyboard users.

  • Performance optimization: Reduce the size of challenge images to improve page load time.

Useful resources

  • Accessibility Insights for Web - A comprehensive tool for performing accessibility testing on websites. It was used to check the component's color contrast.

  • Lighthouse - A tool developed by Google that helps optimize websites, including aspects such as best practices, performance, accessibility, and SEO.

Author

Acknowledgments

A huge thank you to Busari Akeem Tunde for their guidance and support throughout the documentation process. Their insights were instrumental in shaping the project's documenta