Skip to content

All fields in the trial sign up form should indicate they are required

What does this MR do?

Select2 does not display HTML5 required messages, because it hides the original selects as hidden.

screenshot-2020-01-27-18-11-55

  • Select2 works by hiding the HTML select element (1) and prepending div sibling (2)
  • Browsers do not display HTML5 warnings for hidden fields
  • The hack makes the original select element 1px-1px visible, but transparent, behind the select2 div, with a low z-index and margin-top of -3px. So that it's not clickable.

Issue #119347 (closed)

Screenshots

On Chrome, Firefox, Safari, Opera New Edge >78 IE 11 <Edge 18
Very Good Very Good Select2 doesn't work so ignored Ignored
screenshot-2020-01-29-12-35-41 edge79 screenshot-2020-01-29-12-30-25 edge18

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team
Edited by Alper Akgun

Merge request reports

Loading