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.
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
- Semantic HTML5 markup
- CSS custom properties
- CSS Flexbox
- Mobile-first workflow
- Browser-based JavaScript
-
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.
-
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.
-
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.
-
Accessibility: Make the social media sharing menu accessible for keyboard users.
-
Performance optimization: Reduce the size of challenge images to improve page load time.
-
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.
- GitHub - @alberto-rj
- Frontend Mentor - @alberto-rj
- Twitter - @albertorauljose
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