Skip to content

Make the submission form a proper <form> - #1387

Open
winstliu wants to merge 2 commits into
PuzzleServer:mainfrom
winstliu:wl-submission-form-should-be-a-form
Open

Make the submission form a proper <form>#1387
winstliu wants to merge 2 commits into
PuzzleServer:mainfrom
winstliu:wl-submission-form-should-be-a-form

Conversation

@winstliu

@winstliu winstliu commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

As promised in the previous PR, made the answer textbox + button combo into an actual <form>. In addition to the standard accessibility benefits of having screenreaders go "oh, this is a form", we can simplify a lot of the JS handling. Instead of having to add event handlers for both the textbox & the button, now we can listen to the form's 'submit' event and override that.
Also tweaked the styles a bit. If the before/after look very similar, that's intentional :). Pretty much the only visible differences are:

  • "Answer:" is now centered
  • There's now some margin between the submission form & the previous answers dropdown

Before:
before

Before (freeform):
before-freeform

Before (answer submission):
before-answer

After:
after

After (freeform):
after-freeform

After (answer submission):
after-answer

}
<form id="submissionForm" class="mb-3">
<div class="d-flex align-items-center mb-2">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

...pretty sure all this ASP stuff is dead, considering the page manually hits an API endpoint, rather than sending a POST back?

@tabascq

tabascq commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Thanks - I would like @morganbr or @asyasky to look at this one because I don't completely understand the freeform part.

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