Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted about 1 year ago

Social media dashboard using React & Tailwind

react, typescript, tailwind-css
Francis7575•860
@Francis7575
A solution to the Social media dashboard with theme switcher challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

During this challenge, I implemented Dark Mode using useContext and designed a responsive layout with CSS Grid to ensure the app is accessible across all devices.

What challenges did you encounter, and how did you overcome them?

During this challenge, I implemented Dark Mode using useContext and designed a responsive layout with CSS Grid to ensure the app is accessible across all devices.

What specific areas of your project would you like help with?

During this challenge, I implemented Dark Mode using useContext and designed a responsive layout with CSS Grid to ensure the app is accessible across all devices.

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Grace•32,130
    @grace-snow
    Posted about 1 year ago

    There are lots of accessibility challenges in this challenge that you need to pay attention to.

    1. The dark mode toggle is currently inaccessible. Because it's label on the control (the button) is just "toggle button". How would an assistive tech user know what that button does? If using a button it would need to be aria-labelledby by the "dark mode" text node's ID and it would need the aria-pressed attribute (where true equates to dark mode being active).
    2. On that note, you're making the application of that dark mode very complex. I recommend you check the tailwind docs as you can make this simpler I think where tailwind can apply the theme automatically for you (eg based off one class high up in the dom then using tailwind theme classes).
    3. The h1 doesn't usually ever go in a header. It should be the first heading within main. I don't think it matters for this challenge specially as its probably a one-page site but mentioning so you know for next time.
    4. That said, I would add a visually-hidden h2 before the first row of cards at the start of main. Assistive tech users commonly jump to the main landmark or by headings and would not know what this content is as it's currently untitled.
    5. In follower cards the icon img is acting as the card title. That means it needs to be in a heading element (h3 if you've added that h2 above) and the alt should only say the platform name not "icon".
    6. Text should never be in divs or spans alone. Use meaningful elements like paragraphs.
    7. A lot of the data in these cards will need extra visually hidden text to make the data make sense like "username:" before the username.
    8. The label like "followers" is definitely not a heading. To make sense it has to be read along with the number above it. That means they both need to be in a paragraph together. You can use spans inside that paragraph to style each part separately.
    9. "Arrow icon" causes a critical accessibility failure because it does not communicate the meaning of the image. I recommend you treat that image as decorative and include the label as visually-hidden text. It needs to conditionally communicate whether it is an "increase" or "decrease" based on whether it's arrow up or down being shown.
    10. The feedback on the other cards is very similar. Make sure the heading is meaningful like "Facebook likes" and the content makes sense including whether it's showing an increase or decrease in the stats.
    11. Lastly, it's optional, but I would find it beneficial for these cards to be in lists. That would tell screen reader users how many there are.
    Marked as helpful

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
Frontend Mentor logo

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

Frontend Mentor

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

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

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub

How does the accessibility report work?

When a solution is submitted, we use axe-core to run an automated audit of your code.

This picks out common accessibility issues like not using semantic HTML and not having proper heading hierarchies, among others.

This automated audit is fairly surface level, so we encourage to you review the project and code in more detail with accessibility best practices in mind.

How does the CSS report work?

When a solution is submitted, we use stylelint to run an automated check on the CSS code.

We've added some of our own linting rules based on recommended best practices. These rules are prefixed with frontend-mentor/ which you'll see at the top of each issue in the report.

The report will audit all CSS, SCSS and Less files in your repository.

How does the HTML validation report work?

When a solution is submitted, we use html-validate to run an automated check on the HTML code.

The report picks out common HTML issues such as not using headings within section elements and incorrect nesting of elements, among others.

Note that the report can pick up “invalid” attributes, which some frameworks automatically add to the HTML. These attributes are crucial for how the frameworks function, although they’re technically not valid HTML. As such, some projects can show up with many HTML validation errors, which are benign and are a necessary part of the framework.

How does the JavaScript validation report work?

When a solution is submitted, we use eslint to run an automated check on the JavaScript code.

The report picks out common JavaScript issues such as not using semicolons and using var instead of let or const, among others.

The report will audit all JS and JSX files in your repository. We currently do not support Typescript or other frontend frameworks.

Frontend Mentor for Teams

Frontend Mentor for Teams helps companies and schools onboard and train developers through project-based learning. Our industry-standard projects give developers hands-on experience tackling real coding problems, helping them master their craft.

If you work in a company or are a student in a coding school, feel free to share Frontend Mentor for Teams with your manager or instructor, as they may use it to help with your coding education.

Learn more

Oops! 😬

You need to be logged in before you can do that.

Log in with GitHub