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

Results Summary Component Main

Kyvs123 150

@Kyvs123

Desktop design screenshot for the Results summary component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


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

I could not reproduce the active effect on the button on the bigger screen layout. I will get back to it eventually

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

The cursor and hover effect on the button bigger screen

Community feedback

@MohammedOnGit

Posted

Hello Kyvs123!

Your Results Summary Component HTML structure is well-organized! Here are a few improvements and suggestions to optimize the structure and enhance accessibility:

  1. Use Semantic Elements Consider wrapping the score section (Your Result) inside a <section> or <div> to group related content. Additionally, use the <main> element for the primary content and group items logically for better accessibility:
<header>
  <h2 class="title">Your Result</h2>
  <p class="results"><span>76</span> of 100</p>
  <h1>Great</h1>
  <p class="txt">You scored higher than 65% of the people who have taken these tests.</p>
</header>

<main>
  <section class="summary-section">
    <h2>Summary</h2>
    <ul class="summary-list">
      <!-- Each result item here -->
    </ul>
  </section>
</main>
  1. Accessibility Enhancements Ensure the score is read by screen readers properly by using more descriptive content for assistive technologies. For example, instead of just:
<p class="results"><span>76</span> of 100</p>
Add an aria-label or make the structure self-descriptive:
<p class="results"><span aria-label="Your score is 76 out of 100">76</span> of 100</p>
  1. Use of <ul> and <li> Wrap the results list in a <ul> tag to improve semantics, and list each item inside <li> elements. The current setup has some semantic issues (the Summary heading should not be in the <ul> tag). Here's a proper structure:
<h2>Summary</h2>
<ul class="summary-list">
  <li class="reaction">
    <p class="name"><img src="assets/images/icon-reaction.svg" alt="reaction icon"> Reaction</p>
    <p class="points"><span>80</span> / 100</p>
  </li>
  <li class="memory">
    <p class="name"><img src="assets/images/icon-memory.svg" alt="memory icon"> Memory</p>
    <p class="points"><span>92</span> / 100</p>
  </li>
  <!-- Other list items follow -->
</ul>
  1. Button Accessibility Provide descriptive text for screen readers if needed. If the "Continue" button performs a specific action, use an aria-label:
<button class="btn" aria-label="Continue to the next section">Continue</button>
  1. Image Alt Attributes The alt attributes for images are good but could be more descriptive. For example, you could modify:
<img src="assets/images/icon-reaction.svg" alt="reaction icon">

To:

<img src="assets/images/icon-reaction.svg" alt="Reaction score icon">
  1. External Links Add back the attribution section for proper acknowledgment, especially if it's a required part of the challenge.

  2. Visual Structure Make sure that the score circle, "Great" heading, and test descriptions have clear visual hierarchy using appropriate heading tags (<h1>, <h2>, etc.) and consistent spacing in your CSS.

Final Thoughts Overall, your structure is great, but integrating semantic elements, accessibility, and performance best practices can make your Results Summary Component even more robust and user-friendly!

Marked as helpful

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