Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 4 years ago

Article Preview Component with Flex, Grid & some ARIA

accessibility, bem
Māris•250
@marisudris
A solution to the Article preview component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Determining what ARIA attributes go where can be a little confusing. I named my widget a toggletip in BEM even though it really isn't a pure toggletip (which normally only gives additional info after getting clicked/tapped, rather than opening an interactive menu). I took that into account when determining what ARIA attributes to use and went to something similar as with accessible navigation + a hamburger menu - by using aria-expanded & aria-label on the toggle button as well as aria-controls that points at the menu itself. I wonder how did some of you approach this problem (if you did), and if you can recommend some beginner-friendly resources on ARIA. I found a couple (like Inclusive Components by Heydon Pickering) but I'd love to know more. ARIA spec it self is cool, but feels a little heavy for me.

Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Māris's solution.

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

Stay up to datewith new challenges, featured solutions, selected articles, and our latest news

Frontend Mentor

  • Unlock Pro
  • Contact us
  • FAQs
  • Become a partner
  • Use cases

Explore

  • Learning paths
  • Challenges
  • Solutions
  • Articles

Community

  • Discord
  • Guidelines

For companies

  • Hire developers
  • Train developers
© Frontend Mentor 2019 - 2025
  • Terms
  • Cookie Policy
  • Privacy Policy
  • License