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

Rechallenge/Review: Intro component with sign-up form

drunken_neoguri•290
@DrunkenNeoguri
A solution to the Intro component with sign-up form challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


(I translated the sentences into English using 'translate.google.com'. Please understand if there are any strange grammar.)

Hello!

This time, I tried the previous challenge again! When I tried this time, I focused a little more on Javascript.

I wanted to reduce duplication when writing scripts. Nevertheless, the amount of scripts seems to have increased compared to the last time ^^; I'm so happy that the script was written just the way I thought it would!

However, I am wondering if there is a way to reduce it even further here.

Thanks for reading. :D If you have any other suggestions or solutions to the above problems, please feel free to let us know!

Comments always improve my learning!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Vanza Setia•27,715
    @vanzasetia
    Posted over 3 years ago

    Hi there! 👋

    I recommend focusing on HTML and CSS first, there are some issues that you can fix.

    • Every input element needs a label so I recommend having a sr-only label or making the label a placeholder.
    • The error icon should be a background image instead of an img element. This way, when the input is invalid you can add the error icon on the input element.
    • The type of the button should be submit instead of button.
    • For the alert message, I highly suggest using p instead of div. Always use a meaningful element to wrap text content.
    • input doesn't have a closing tag.
    • The password input should have type="password" and the email input should have type="email". Using the correct type for each input helps the mobile users to get the correct keyboard layout for each type of input.
    • Use the native HTML whenever possible. In this case, it's possible to use main tag instead role="main".
    • Adjust the breakpoint of the media query. Currently on 841px to 877px the text is so narrow.
    • .container__right__form, it can't have an element nested instead an element. I recommend creating a new block element instead. BEM = block__element--modifier not BEE = block__element__element.

    I highly suggest writing the styling using the mobile-first approach. It often leads to shorter and better performance code. Also, mobile users won't be required to process all of the desktop styles.

    That's it! Hope you find this useful!

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

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.

Oops! 😬

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

Log in with GitHub