FAQ using ReactJS and also Mobile-First approach fordesign
Design comparison
Solution retrospective
Hi I tried my best to position the background pattern for the desktop perfectly but I couldn't make it 100% right for different screen sizes. I would appreciate any advice or a different approach to this problem. Thank you
Community feedback
- @comendrunPosted over 2 years ago
dear Vanza (@vanzasetia) can you please help me with this? I get a lot of accessibility problems in ReactJS apps and I don't why is it. I tried to read the suggested document about it but I couldn't understand, unfortunately. they're about landmarks on the page
0@vanzasetiaPosted over 2 years ago@comendrun You need to wrap all the elements with
main
element except for theattribution
.So, since you are using React (which I don't know anything about it 😆) I suggest swapping the
div
with thecontainer
class to amain
element.After you fixed that and generate a new report all the issues should be gone.
Let me explain why it fixes the issue.
- Document should have one main landmark - it means that any website should have one
main
element. So, it's a necessary thing to wrap the main content with themain
element which in this case, all the content of the card element. - All page content should be contained by landmarks - it means that all HTML elements (e.g.
p
, headings,img
, ect) should be wrapped by eitherheader
,main
, orfooter
.header
for internal navigation,main
for the main content of the page, andfooter
for the attribution, secondary navigation, copyright, etc.
Hope this helps you solve the issue.
Marked as helpful0@comendrunPosted over 2 years ago@vanzasetia thank you very much for this dear Vanza. I kind of knew it's about having a main tag on the page but my main problem was that usually, we don't use this tag in the React app. maybe I'm wrong I will try that and hope it helps thank you again for the time and comment dear Vanza
0 - Document should have one main landmark - it means that any website should have one
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