Skip to content
  • Unlock Pro
  • Log in with GitHub
Solution
Submitted 9 months ago

Password generator app

accessibility
P
Aydan•680
@AydanKara
A solution to the Password generator app challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


What are you most proud of, and what would you do differently next time?

āœ… Proud of:

  • Custom UI Components: I successfully created a visually appealing and accessible UI, including a custom range slider and styled checkboxes.
  • Smooth user interactions, such as real-time updates on password strength and a visible "Copied" message.
  • Strong password generation using crypto.getRandomValues(), ensuring security.
  • Good use of CSS variables for easy customization of colors and styling.
  • Proper event listeners to dynamically update the UI and handle interactions.

šŸ”„ What i would do differently:

  • Improve accessibility by adding aria-live to announce changes in password strength and copy status.
  • Use localStorage to remember the last selected settings when reloading the page.
  • Enhance the strength calculation by considering character variety, not just length.
  • Optimize CSS further, possibly using clamp() for better responsiveness.
  • Consider using CSS animations for smoother transitions (e.g., on password strength bars).
What challenges did you encounter, and how did you overcome them?

āœ… Dynamic Strength Meter Updates: Ensuring the correct number of bars filled dynamically required restructuring the JavaScript logic.

šŸ‘‰ Solution: I used an array-based approach to update individual bars based on strength levels.

āœ… Custom Range Slider Styling: Making the range slider fill dynamically with color while keeping it cross-browser compatible was tricky.

šŸ‘‰ Solution: I used CSS gradients and JavaScript event listeners to update the slider background dynamically.

āœ… Checkbox Custom Styling: Styling checkboxes with a custom SVG check icon was challenging due to browser inconsistencies.

šŸ‘‰ Solution: I used background-image with :checked pseudo-class and ensured accessibility compliance.

āœ… Secure Password Generation: Using Math.random() was not secure enough.

šŸ‘‰ Solution: I switched to crypto.getRandomValues(), which provides cryptographically secure randomness.

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

šŸ” Looking for feedback on:

  • Better password strength algorithms – Right now, we check only length. Could we analyze character diversity for a more accurate rating?
  • More accessible UI/UX – How can we improve screen reader support and keyboard navigation?
  • Code optimization – Are there better ways to handle event listeners and state management in plain JavaScript?
Code
Loading...

Please log in to post a comment

Log in with GitHub

Community feedback

No feedback yet. Be the first to give feedback on Aydan's solution.

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
  • Use cases

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