Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve menu form #527

Merged
merged 1 commit into from
Nov 12, 2024
Merged

Improve menu form #527

merged 1 commit into from
Nov 12, 2024

Conversation

atjn
Copy link
Contributor

@atjn atjn commented Nov 12, 2024

Improvements to the product buying form in the user menu:

  • No longer uses JS.
  • Page size is much smaller.
  • Form is much more accessible.

There are no visual changes, except for some edge cases.

Instead of creating a new form for each product, we create a single form with a custom submit button for each product. Because we don't have to create 1000 forms, we save a lot of bandwidth. This also contributes to accessibility, since the browser can assert that this is a single form with different options, rather than a thousand separate forms that might not be related to each other.

Instead of using a link that invokes JS to submit a form, we use a button that natively submits the form. This is a big accessibility improvement, as it is now clear that the button is related to the form, and it is clear that the product name in the button is highly relevant.

Copy link
Member

@krestenlaust krestenlaust left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice👍

@krestenlaust krestenlaust merged commit 28f5042 into next Nov 12, 2024
3 checks passed
@krestenlaust krestenlaust deleted the menu-form-improve branch November 12, 2024 12:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants