Skip to main content

Updated text box required for improved accessibility

What components does this change affect?

This change affects all implementations of the text box component.

HTML structure changes:

  • Added aria-required="true" to required text box inputs

Before

<input
    class="form-control"
    type="text"
    id="TextBoxBasicRequired"
    name="TextBoxBasicRequired"
    value="" />

After

<input
    class="form-control"
    aria-required="true"
    type="text"
    id="TextBoxBasicRequired"
    name="TextBoxBasicRequired"
    value="" />

Why this change was made

This change improves the accessibility of the text box component by ensuring required text box fields are programmatically identified as required for users of assistive technologies.

Benefits include:

  • Better accessibility – screen readers can identify when a text box is required
  • Supports WCAG 2.2 guidance – helps ensure required fields are communicated programmatically as well as visually
  • Better user experience – helps users understand which fields must be completed before submitting a form

Recommended checks for consuming teams

After updating your Design System packages, we recommend reviewing text box usage in your application to confirm everything behaves as expected.

Areas worth checking:

  • required text boxes continue to display correctly
  • required field indicators remain visible
  • screen readers announce required text boxes appropriately
  • existing validation behaviour remains unchanged

Applications not using the NuGet package tag helpers should review any manually maintained text box markup and align it with the updated structure shown above and on the text box page in the form components section.

Data submission

No changes are expected to form submission, model binding, or data persistence as part of this update.

For peace of mind, you may wish to perform a quick check in consuming applications to confirm text box values continue to submit and save as expected.

Summary

This change improves accessibility by ensuring required text box fields are programmatically identified as required for assistive technologies.

This pattern will be extended to other Design System form components in a future release.

Internal reference

Design System internal reference: 97877

Was this page helpful?