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

Password Generator App | Solidjs - Typescript - Postcss

accessibility, solid-js, typescript
Antoine C•1,240
@mattari97
A solution to the Password generator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


Hello everyone 😊. This is my solution for the Password Generator App challenge.

It is the second time I use solid-js and it went pretty smooth! I love the framework. It feels like an hybrid between React and Vanilla JS.

I added two little bonus :

  • Generate only strict passwords (at least one character of each selected rules).
  • Toast notifications success/error (copied to clipboard).

Regarding accessibility as always I tried to do my best but this time I used a new pattern.

I tried to not use the disabled HTML attribute but work with the aria-disabled instead. It means that I i am required to check for the validity of the inputs in the JavaScript because the buttons are actually clickable even with the "disable" style.

It might sound like more work but it is not! Why? Because I do it anyway.. You can remove the disabled attribute from the developer console (F12) and break the app if the only check you have is a "disabled" button.

I also added a tooltip to explain why the button is "disabled" for a better UX.

For users using keyboard navigation & screen readers it is a big + ! Because the button is still focusable and they know why the action fails.

Anyway. That is a long message. So if you are interested here is a link to a blog post on that subject.

Feel free to share any improvement you want to see implemented in this project.

Thank you for your time. Have a nice day/night. Peace 👌

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

  • P
    Robert McGovern•1,075
    @tarasis
    Posted almost 3 years ago

    Really nice solution.

    One comment I have is that while the copy icons prevent you from copying the placeholder text, you can just drag & select the placeholder text and copy it.

    The toast is a nice touch, although personally I'd prefer it at the top of the screen (desktop) near the copy icon because that is where my eyes are focused.

    (Complete aside, this could be safari, there is an odd glitch where sometimes the whole bottom box area jumps when you move the slider from 0 to 20, happens around 9 or 10. Usually happens when you move it quickly but sometimes slowly)

    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.

Oops! 😬

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

Log in with GitHub