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

Deprecating `usa-input-required` has important backward-compatibility concerns #2238

Closed
thisisdano opened this Issue Nov 16, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@thisisdano
Copy link
Member

thisisdano commented Nov 16, 2017

In version 1.4.0 we indicated that we would deprecate usa-input-required unless a compelling argument existed to keep it.

A new usa-input-optional class has been added in favor of usa-input-required (#2116). The latter is now deprecated and will be removed in a future release of the Standards, due to evidence that labeling optional fields over required ones is a best practice. If you feel strongly about this issue, however, please contact the Standards team, as we may un-deprecate usa-input-required if a compelling argument exists.

references

http://uxmovement.com/forms/why-users-fill-out-less-if-you-mark-required-fields/
https://www.nngroup.com/articles/web-form-design/
http://govuk-elements.herokuapp.com/form-elements#form-optional-fields

While it makes very good sense to promote best practices, deprecating critical component variants is a challenge. The Standards should be a clear guide for best practices and we should not actively enable non–best practices unless we have little choice. This may be one of those cases where there's not only a large potential gap between the best practice and user expectations, but also a case where our our earlier support for usa-input-required resulted in a support expectation for a critical element (forms) that we may have the responsibility to maintain.

todo

  • evaluate whether it makes sense to continue to deprecate usa-input-required
  • if not, determine how to support our best-practice guidance alongside legacy needs
  • implement this solution and communicate it to our users in release notes and documentation
@maya

This comment has been minimized.

Copy link
Member

maya commented Nov 17, 2017

These are still part of the codebase here: https://github.com/18F/web-design-standards/blob/develop/src/stylesheets/elements/_inputs.scss#L89-#L92.

We discussed that we did not plan to deprecate these in terms of removing them from the codebase, we will just not be advocating them as a "best practice." Teams may decide to use the required field if it makes sense for their use cases.

@amilie

This comment has been minimized.

Copy link

amilie commented Nov 17, 2017

@maya That sounds great. Does that mean that the following item in the v1.4.0 release notes is no longer accurate?

A new usa-input-optional class has been added in favor of usa-input-required (#2116). The latter is now deprecated and will be removed in a future release of the Standards

@maya

This comment has been minimized.

Copy link
Member

maya commented Nov 17, 2017

@amilie Correct! I don't believe we have plans to remove it, so that is no longer accurate.

@toolness

This comment has been minimized.

Copy link
Contributor

toolness commented Nov 20, 2017

Thanks @maya, I've just updated the release notes for 1.4.0 to reflect this:

screen shot 2017-11-20 at 8 31 23 am

I also just filed uswds/uswds-site#455 to ensure that usa-input-required becomes documented (lest this become a secret feature that only long-time users of the standards know about).

@maya maya closed this Nov 22, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment