@MelvinAguilar
Posted
Hello there! ๐ The solution you provided five months ago for this challenge looks great! ๐ However, I have a few suggestions to address some potential drawbacks in terms of accessibility:
-
Firstly, let's talk about the "main__creations" section:
The elements in that section have a hover effect, making them seem like interactive elements such as buttons or links. Since you're showcasing a list of "creations", and users might expect to navigate to these "creations" by clicking on them, it might be more accessible to implement actual links (
<a>
) instead of using<div>
.Now, here are the drawbacks of using
<div>
instead of a link:- Users who rely on keyboard navigation can't easily move through the "creations" using the
Tab
key. - There is no pointer cursor in your solution.
- Users might expect some action to occur when they click on the items.
For a more elegant solution, you might want to consider implementing some of the techniques shared on this page: Cards - Inclusive Components ๐.
- Users who rely on keyboard navigation can't easily move through the "creations" using the
-
Consider adding a "Skip to main content" link to your solution:
This helps users bypass header links and directly access the main content, improving the experience for those using screen readers or keyboard navigation.
You can follow a guide on how to create a "Skip to content" link by visiting the following link: How to Create a "Skip to Content" Link | CSS Tricks ๐..
-
Media Queries and Horizontal Scrollbar:
Lastly, a horizontal scrollbar appears between 56em (896px) and 1024px due to a single media query and the "OUR CREATIONS" section. You could either add more media queries or use the RAM (Repeat, Auto, Minmax) technique in CSS to avoid the need for multiple media queries.
You can learn more about the RAM technique here: Repeat, Auto, Minmax | Web.dev๐..
These suggestions are aimed at enhancing your project's accessibility. Keep up the fantastic work! If you have any questions or need further assistance, feel free to ask. ๐
Marked as helpful
@0xabdulkhalid
Posted
@MelvinAguilar Thank you for providing detailed insights for my solution.
For now i have made changes for accessibility on creations section. I think we don't want to add explicit roles for ul
& li
like role="list"
, role="listitem"
. Is it okay ?
I have not used RAM
in my entire css journey so in future i can give it a try, the resource you shared is absolutely valuable!
Thank you.
@MelvinAguilar
Posted
@0xAbdulKhalid
We should consider using explicit roles like role="list"
and role="listitem"
because some screen readers, specifically VoiceOver in Safari on macOS and iOS, tend to remove list element semantics when "list-style: none"
is applied in CSS. Without these roles, users won't hear that the content is a list or receive information about the number of items.
Note: Website checkers might consider it unnecessary, but it's essential for accessibility.
For more information, you can refer to the following sources: