Design comparison
Community feedback
- @tatasadiPosted about 2 months ago
Great job on the layout and structure of your article preview component! Here are a few suggestions to improve it:
-
ARIA Attributes for Buttons: Both the "share" and "close" buttons should have
aria-label
attributes to improve accessibility. This helps screen readers provide meaningful context, especially since these buttons use icons only. -
Avoid Empty Links: The
<a>
tags for sharing links and the share button currently have emptyhref=""
attributes. Make sure to add proper links or use#
as placeholders to prevent unexpected behavior. -
Transition on
lg:pl
Class: Thelg:pl-[8px]
class in the<main>
tag is missing a closing bracket, which breaks the class. This should be corrected tolg:pl-[8px]
. -
Use
rem
Instead ofpx
: Many of your spacing and font-size values usepx
units. It's recommended to userem
instead ofpx
for better scalability and accessibility, especially on responsive designs. -
Add
alt
Text for Share Icons: The social media icons (Facebook, Twitter, Pinterest) should have more descriptivealt
attributes. Instead of justalt="icon-facebook"
, use something likealt="Share on Facebook"
for clarity.
These changes will help improve both accessibility and maintainability while ensuring a better user experience across different devices. Keep up the great work!
0 -
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