Responsive slider component using JS and CSS Grid
Design comparison
Community feedback
- @anoshaahmedPosted almost 3 years ago
To avoid accessibility issues in the future:
- wrap everything in your body in
<main>
OR giverole=""
to the direct children of your<body>
... Click here to read more - have at least one
<h1>
in your code
Good job! :)
Marked as helpful0@KaskaS-OPosted almost 3 years ago@anoshaahmed Thanks for advices! Isn't it a bit pointless to use <h1> when the project contains only a component? I'd think it should be reserved for main title of the whole website / content.
1@anoshaahmedPosted almost 3 years ago@KaskaS-O Yup, so this is what you do: you add an h1 in your html, then in your css, you give it the following properties:
h1 { font-size: 0; width: 1px; height: 1px; display: inline-block; overflow: hidden; position: absolute; border: 0!important; padding: 0!important; margin: 0!important; clip: rect(1px,1px,1px,1px); }
And then your h1 won't show at all on your page, but a blind person using a screen reader would be able to tell what the page is about :)
Marked as helpful0 - wrap everything in your body in
- @skyv26Posted almost 3 years ago
Hi! Dude,
To solve accessibility issues:
-
wrap everything in your body in <main> OR give role="" to the direct children of your <body> ... Click here to read more here
-
Don't let alt attribute empty, always add some meaning text in it, so that user able to understand. Either you can use
aria-label
Click here to read more here OR add meaningful text in alt Learn about image
Good Luck ;)
Marked as helpful0@KaskaS-OPosted almost 3 years ago@skyv26 Thanks a lot! Accessibility is definately my underbelly... I'll fix it in a moment.
1@skyv26Posted almost 3 years ago@KaskaS-O After update, commit and push, come back here, click on above report button. A new page will open, then there you will generate report, click on that and see your result.
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