Required radio buttons in Likert elements have invalid aria-required markup

Created on 28 March 2023, about 1 year ago
Updated 26 April 2023, about 1 year ago

Problem/Motivation

There was a fix made 2 years ago that removed aria-required from radio inputs β†’ , since that wasn't an allowed attribute on the radio role. This is still the case in the ARIA spec as well as the W3C Recommendation ARIA in HTML. Webforms using the Likert element still have radio buttons rendering an aria-required attribute, though.

Steps to reproduce

  1. Spin up a 10.1.x-dev Drupal instance
  2. Install the Drupal 10 supported version of Webform, 6.2.x. Enable Webform and Webform UI
  3. Add a Likert form element with some questions rows and answer columns. Under form validation check the required checkbox to make the Likert element required
  4. When viewing the form, the code inspector shows the radio inputs have both a required and aria-required attribute.

Proposed resolution and benefits

Remove the aria-required attribute from the Likert input element PHP. This will reduce the amount of code needed to convey the same information, if a field is marked as required.

Remaining tasks

User interface changes

No known user interface changes. Required setting behaves as usual, only change should be resulting markup.

API changes

Shouldn't be an API change since this is strictly affecting HTML markup--no new variables, functions, classes, etc. should be added.

Data model changes

No data model changes.

πŸ› Bug report
Status

Fixed

Version

6.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States CarlyGerard

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

Comments & Activities

Production build 0.69.0 2024