Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted almost 2 years ago

Newsletter Signup Page

accessibility, bem, typescript, vite
Fluffy Kas•7,655
@FluffyKas
A solution to the Newsletter sign-up form with success message challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hey guys,

I haven't submitted anything in a while so I'm happy I could find some time for this. Feels like I've been focusing on different things at work lately (even some backend stuff) so I really enjoyed doing CSS again. ^^

This was a quick and easy challenge, I learned nothing new, I just wanted to have some fun with it and see how rusty my CSS got in the past few months.

Take a look if you want, if you see any mistakes, don't be scared to point them out. Have a good day, peeps! ❤️

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • Grace•32,130
    @grace-snow
    Posted almost 2 years ago

    This is a really nice solution, well done!

    A couple of small notes...

    1. If you remove list styling some assistive tech will remove the list semantics altogether. An easy way to restore them is to add role="list" to the ul/ol and role="listitem" to each li.
    2. To programmatically link the error message to the input, wrap it in an extra element that is always present in the DOM (not display none) and give it an ID. Then use aria-describedby on the input pointing to the ID. If you don't want to wrap it in an extra element, you can use the existing ID and remove the hidden/display none from the existing error element. But the text inside that error element must be empty by default so it doesn't get read out.
    3. Focus-visible styles need to be really obvious so that keyboard users know where they are on the page. In fact this autumn, the new WCAG requirements will add success criteria to make it clearer what is required. A pale dotted outline is fine for a focus style, but not for a focus**-visible** style. It doesn't need to look pretty, it needs to look bold/obvious/clear
    4. Consider adding an aria-live attribute to this whole component. That way any DOM changes will be announced to screenreaders immediately on change (e.g. the error messages and when the content changes between thank you / form)
    5. I recommend managing focus on this. Currently, if you submit the form or dismiss the confirmation, focus moves to the body instead of the new content. Instead, you could give the two headings a negative tabindex and move focus onto whichever of them is present on button click/form submit. This may negate the need for point 4 in this feedback (although you'd still need to ensure the error has aria-live so that gets read out)

    I hope all this makes sense and is helpful. This really is a very good solution.

    Marked as helpful
  • Omprakash Rahangdale•900
    @OmprakashR
    Posted almost 2 years ago

    Hi, Congratulations!

    I have some suggestions for this task.

    • add bullet li images ul { list-style-image: url('sqpurple.gif'); } or li::before { background-image: url("image_URL"); } With this approach no need to add images again and again.

    • add an alt attribute in the image tag, and add the width and height for best accessibility

    I hope this is helpful for you!

    Thank You!!!

    Marked as helpful
  • Ramazan Yamac•0
    @ramazanyamac
    Posted almost 2 years ago

    You can use grid for layout. Guide => https://css-tricks.com/snippets/css/complete-guide-grid/

  • webdevcodi•0
    @desiredstate2021
    Posted almost 2 years ago

    Dope solution.

  • Matt Studdert•13,611
    @mattstuddert
    Posted almost 2 years ago

    Nice to see you posting a new solution, @FluffyKas! 🥳 That's interesting you've been focusing more on back-end stuff lately. How have you found the switch to more full-stack development?

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.

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

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

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