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

Crowdfunding Page - Mobile First, Sass, JS, modal & input

Yuko Horita•645
@Sloth247
A solution to the Crowdfunding product page challenge
View live sitePreview (opens in new tab)View codeCode (opens in new tab)

Solution retrospective


I tried to support assistive technologies♿ as much as possible.

  • All interactive elements can be accessible by keyboard focus.
  • I tried to tackle "keyboard trap" to avoid focusing elements on original page when opening the modals, however I could not achieve by solution. Could someone give me a good advice on it? 🙏

Here is the functions of this website;

  • Bookmark button should be toggle.
  • The target value, backers and the progress bar should be updated upon every donation.
  • Select Reward button and Continue button should be disabled when amount left gets 0. - I still have an issue on changing the container to get lower opacity.
  • Amounts left on main page and modal should be updated upon each donation.
  • By pressing Escape key, modal should be closed.
  • By clicking modal's overlay, modal should be closed.

I am now focusing on WAI-ARIA and the coding on JavaScript. Any suggestions and feedbacks are welcome!

Code
Select a file

Please log in to post a comment

Log in with GitHub

Community feedback

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

    Awesome work on this challenge! It's great to see you learning and focusing on WAI-ARIA. It's such an important area that many people brush over, so keep at it 🙂

    With the opacity issue, are you saying the button should be slightly transparent when someone adds "0" as a value? By looking at your code, it seems you're trying to manually set a lot of things instead of letting the browsers do the heavy lifting. For example, you've got min and max values on the number inputs, but you've added novalidate to the forms, which mean the attributes will be ignored.

    Your forms.forEach is also pretty big. I'd recommend breaking code out into smaller, reusable, named functions wherever possible. It will make your code much easier to reason about.

    I noticed that once you select a reward, it's not possible to tab to any other rewards within the modal. So if I selected the first award but then changed my mind to the last reward, I wouldn't be able to update my selection if I navigate using my keyboard.

    I mentioned in Slack that if this were a real-world project, you'd typically use an accessible modal package like a11y-dialog. You could try incorporating something like that into the project to practice building a fully-tested, robust modal popup. Completely optional, of course, but I'm sure it would be worth the effort!

    I hope this helps. Keep up the great work! 👍

    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.

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