Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted over 3 years ago

HTML & CSS

Mark Mitchell•1,820
@markup-mitchell
A solution to the Order summary component challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


That background wave shape totally defeated me.

I can't even figure out what the intended behaviour is between the mobile and desktop breakpoints.

Any suggestions what an elegant implementation would be?

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Mark Mitchell•1,820
    @markup-mitchell
    Posted over 3 years ago

    Hi @grace-snow,

    There's an example of text content in <div>s right in the spec's <p> tag section!

    It literally says:

    "Authors wishing to conveniently style such 'logical' paragraphs consisting of multiple 'structural' paragraphs can use the 'div' element instead of the 'p' element."

    I know it's not identical to my use case, but it demonstrates that there's not some completely inviolable law in place. And if it can be done for the purposes of "convenient styling" I daresay I have enough justification.

    Not that I'm taking the spec as the limits of my concern, especially in relation to accessibility. Yes, not using sematic tags is potentially exclusive, but doesn't using the wrong tags carry the same, or even greater risk?

    My FEM challenge solution is a snapshot of a component in on-going development within a wider (imagined!) project. I don't know all the contexts in which its subcomponents will be consumed yet, so I've made the best choice I can with the knowledge I have.

    I'd expect a11y testing across the (notional) product as a whole to guide decisions about how the component should be refactored. Which is why, if you can describe any specific issues it would be more helpful than a general statement that for some unspecified usage of some unspecified assistive tech it might be problematic.

    I asked previously whether you think Annual Plan $59.99/year might legitimately be expressed as a table (I'm increasingly sceptical about that), and if you can point me to the section of the spec about phrasing content that you refer to, I'll check it out. There's also the matter of the placement of the background image, which was my original feedback request.

    These are things you can help me with, if you're taking the time to correspond.

    On the broad topic of using native elements and semantic tags for reasons of accessibility, you're preaching to the choir!

  • Grace•32,130
    @grace-snow
    Posted over 3 years ago

    Hi Mark

    The main thing I notice thats worth addressing on this solution is the need to improve html semantics. It's such an important skill to master.

    As a rule, never place written content in a div or span alone. It always needs to be in a meaningful element, like paragraph.

    Annual plan deserves to be a heading. Headings must go in order as they are the main mechanism for giving structure to a page (and what assistive tech users rely on to navigate a page's content)

    Buttons and anchor links have very distinct purposes. Anything that triggers an action, like opening a modal, toggling a price etc must be a button element. Anything that triggers navigation must be an anchor tag.

    I haven't checked the css, but another top tip is to ensure all interactive elements always have a clear and obvious focus-visible style

    I hope these tips are helpful. Good luck

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 1st-party linked stylesheets, and styles within <style> tags.

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.

Oops! 😬

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

Log in with GitHub

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