Currently, the description text for disabled form elements do not have any styling that indicates the control is disabled.

We need to style this so it seems more in place.

Comments

mherchel created an issue. See original summary.

gauravvvv’s picture

Hi @mherchel, Please write the steps to reproduce this issue. or Is this available on the live preview? https://tugboat-aqrmztryfqsezpvnghut1cszck2wwasr.tugboat.qa/

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

xjm’s picture

Priority: Minor » Major

This actually sounds like a fairly serious accessibility issue to me. If there is no way to tell the control is disabled, that is very disorienting for the user.

xjm’s picture

Priority: Major » Normal

Oops, never mind, I misunderstood the issue title. It is only the description that is lacking the styling.

However, I would still call this a normal accessibility bug because it is confusing in that the text seems disconnected from the form element.

kostyashupenko’s picture

Status: Active » Needs review
StatusFileSize
new1.53 KB
abhijith s’s picture

StatusFileSize
new8.74 KB
new7.99 KB

Applied path #6 and it works fine.The description text of form elements are faded out after applying this patch, which is similar to their input element.

Before patch:
before

After patch:
after

RTBC +1

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

andy-blum’s picture

Status: Needs review » Needs work

Needs re-roll.

gauravvvv’s picture

StatusFileSize
new1.41 KB

Re-rolled the patch for Drupal10.1

gauravvvv’s picture

Status: Needs work » Needs review
deepalij’s picture

Applied patch #12 on Drupal 10.1.x-dev.
Patch applied cleanly.
The issue got fixed after applying the patch.
Screenshots are as per the #7

RTBC +1

Manoj Raj.R’s picture

Applied patch #12 on Drupal 10x
The description text of form elements are faded out after applying the patch.

RTBC +1

andy-blum’s picture

Status: Needs review » Needs work

I'm seeing the new styles apply, but they do not match the results of the screenshot in #7. I'm seeing the disabled input's label being colored with --color-gray-70, but the description with --color-gray-45.

Only local images are allowed.

Another thing I'm seeing that I'm not sure is an issue or not:

  if (!empty($variables['description']['attributes'])) {
    $variables['description']['attributes']->addClass('form-item__description');

    if ($variables['disabled']) {
      $variables['description']['attributes']->addClass('is-disabled');
    }
  }

The code above will only add the 'is-disabled' class if the description already has an attributes object. If not, it just gets bypassed. Should we alter this portion of the code to create an attributes object if one does not already exist to make sure this class can be added if needed?

mgifford’s picture

Issue tags: +WCAG 143

This is likely a WCAG SC 1.4.3 issue.

Longer discussion of disabled styles here https://github.com/w3c/wcag21/issues/805

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.