shift-org / shift-org/shift-docs

Add/edit form - error styles persist on the terms checkboxes even after correcting the errors

Open
#491 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug frontend
Dominant language
JavaScript
Stars
30
Forks
25
Avg merge
9m
Merged PRs (30d)
1

Description

  1. Go to the add/edit form
  2. Choose a date, but leave all other required fields blank
  3. Submit the form; see that error styles have been applied to required fields
  4. Check the "code of conduct" and "ride comic" checkboxes, leaving the other required fields blank still
  5. Submit the form again
Result

The <input> elements correctly changed to aria-invalid="false", but the checkbox labels are still styled in red.

Expected result

The <input> elements correctly changed to aria-invalid="false", and the checkbox labels have reverted their default, non-error state.

Note

See /site/themes/s2b_hugo_theme/static/js/cal/addevent.js#L186 and #L129. The has-error class is being assigned and removed with actions that aren't symmetrical.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with site/themes/s2b_hugo_theme/static/js/cal/addevent.js, especially lines 129 and 186, and reproduce the add/edit form steps described in the issue. Compare how the has-error class is assigned and removed for the checkbox labels. Done means the labels return to their default, non-error styling after the checkboxes are corrected and the form is submitted again.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.