Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Ecommerce page with card-preview

P
Harm Intemann• 590

@ghintema

Desktop design screenshot for the E-commerce product page coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
3intermediate
View challenge

Design comparison


SolutionDesign

Solution retrospective


I used aria-expand on the hamburger menu-button to improve accessibility. What do you think of it? I would like to get some advices on how to make the card-preview (pop-up) accessible for screenreaders. I didn't get that.

I also build a fully functional slider with auto-play and gallery-navigation. But due to that I waved the extra modal meant in the design... Feel free to comment on my work! :)

Community feedback

P
Alan Ibarra• 440

@Ibarra11

Posted

One thing I noticed is that the shopping cart button is not accessible via keyboard. It only works if you click on it, but it should also respond to the enter key that way someone that uses a keyboard can open it. When the modal is opened, it needs to trap focus in there meaning that a keyboard user wouldn't be able to interact with the things outside of it. And, when the modal is closed you should return focus back to the button that triggered the modal. For example, if the add to card button cart triggered the modal when the modal is closed the focus needs to be returned back the add to cart button. There is a lot of accessibility concerns that comes with modals, so in most cases people tend to use modals that other people have built and are reliable.

Also, on the mobile navigation if you press tab to cycle through the interactive elements it takes about 6 tabs to reach the hamburger menu. I can still interact with the modal even thought you pushed it off the screen. One thing you can do is to use display: hidden when the user hasn't clicked the hamburger menu that way it is no longer on the screen and not interactive. However, I'm not sure how this will effect your animation. Another possible solution, would be to add tabindex="-1" on the links when the menu is not open and remove it when the menu opens. This is just an idea, I'm not sure that it will work.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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