Problem/Motivation

The .usa-input-required class was deprecated in USWDS v2, and removed in v3.

USWDS v1 USWDS v2

...

...

.usa-input-label-required

.usa-label.usa-label--required

...

...

.usa-input-required

deprecated: no longer recommended

Steps to reproduce

This is the class supplied via uswds_base_preprocess_form_element_label() when a form element is required.

Proposed resolution

Deprecate this usage in lieu of the .usa-label.usa-label--required

Remaining tasks

Determine a non-breaking implementation (perhaps add the new class).
Mark the deprecated class to be removed in the next major release.

User interface changes

The USWDS supported required asterisk will begin to appear on required field labels.

API changes

None.

Data model changes

None.

Issue fork uswds_base-3568582

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jcandan created an issue. See original summary.

mferanda’s picture

Good catch!

Are you able to change, test, and validate fix?

mferanda’s picture

Assigned: Unassigned » mferanda
Category: Feature request » Task
Status: Active » Fixed

Changed to
$variables['attributes']['class'][] = 'usa-label--required';

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

mferanda’s picture

Status: Fixed » Closed (fixed)