Design decision 13 - Reduce aggressiveness of form validation plugin
Summary
- Author: @EricDunsworth
- Experts: @EricDunsworth, @RobJohnston, @biljanap, @lisafast, @juleskuehn, @GormFrank, @duboisp, @bsouster
- Status: Approved
- Last updated: 2020-12-02
- History:
- (2020-12-02) Approved
- (2020-09-10) Add WCAG 2.x references
- (2020-09-10) Presented
- (2020-08-17) Draft
Issue
One of wet-boew/wet-boew#7921’s changes caused form validation to always get triggered when focusing out of fields. The end result was that required field validation became drastically more aggressive, to the point of annoying users and impeding usability.
For example:
- Tabbing through required inputs, checkboxes or radio buttons that had never received any user input would immediately trigger required field errors
- Ticking and then unticking any required checkbox would immediately trigger a required field error
Examples of situations where that would annoy users:
- Keyboard users getting bombarded with required field errors while tabbing through a form
- Mouse/Touch screen users accidentally clicking or touching a random required field, then having to deal with fields visually-shifting downwards
According to the jQuery validation plugin’s reference documentation, the plugin is meant to provide quick contextual error feedback, without going so far as to annoy users. It considers displaying error messages without having received user input to cross that line.
Proposed solution
Merge wet-boew/wet-boew#8815 to revert the form validation plugin’s onfocusout behaviour to what it was like before wet-boew/wet-boew#7921.