Missing Required Indicator on prop form elements

Created on 7 December 2024, 15 days ago

Overview

There should be a visual required indicator on prop form elements that are required.

Proposed resolution

Add a CSS pseudo-selector to add a * character, just like how core does in various spots.

User interface changes

πŸ› Bug report
Status

Active

Version

0.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @luke.leber
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    @bnjmnm is the best suited person to triage this.

  • First commit to issue fork.
  • Merge request !475#3492367 there is an asterisk β†’ (Open) created by bnjmnm
  • πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

    I'm not sure what to triage past the metadata that's already been set on the issue.
    However, it's a simple enough change that there's an MR to take care of this. We could add a bunch of "needs design"-esqe tags to do this thoroughly but I'm partial to getting this out there and allowing the response to these changes inform any changes to the implementation.

  • πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

    I gave !475 a test run, recompiled the UI, flushed some caches, and refreshed. Lo and behold, working required indicators.

    This looks great to me, marking RTBC, as the accessibility concern is alleviated by this, even if a follow-up design task needs to happen.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #5++

    Should we also be changing FormElementLabel to emit something visually hidden for screen readers too?

    β€” @larowlan

    +1

  • πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

    Isn't the required attribute the equivalent signal for non-visual users? It's announced by all major A/T tools.

    Adding another signal is probably redundant IMO.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    I just checked /node/add/article in Drupal core and saw:

    So let's let @bnjmnm have the final say β€” he's an Accessibility maintainer in Drupal core.

Production build 0.71.5 2024