The second checkbox depends on the first checkbox:
before.png

So we could hide the second one
after-collapsed.png

until the first one is checked:
after-expanded.png

Comments

Niklas Fiekas’s picture

Status: Active » Needs review
StatusFileSize
new668 bytes

This works for me.

Bojhan’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs usability review

for me to

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. Thanks!

tstoeckler’s picture

Status: Fixed » Needs work

Do we really need the description now that the field is displayed conditionally anyway?

Niklas Fiekas’s picture

I still think that's useful. Also, otherwise that second checkbox would be very confusing without JavaScript.

tstoeckler’s picture

Also, otherwise that second checkbox would be very confusing without JavaScript.

I also thought about that, but then I thought that we usually don't provide such descriptions for non JS-users.

scor’s picture

Status: Needs work » Needs review
Issue tags: +Needs accessibility review
StatusFileSize
new639 bytes

I agree with #6, I could not find other places in core where such #description is used, but I'm happy to be proven wrong. I looked at many similar instances of form elements using #states to be hidden, and none of them was providing a explicit description saying that setting X only has an effect if option Y is enabled:
core/modules/field/modules/link/link.module:229 (Show URL as plain text)
core/modules/language/language.admin.inc:657 (Path prefix configuration)
core/modules/locale/locale.bulk.inc:85 (Overwrite non-customized translations)
core/modules/menu/menu.module:667 (Link title and description)
core/modules/node/lib/Drupal/node/NodeFormController.php:145 (Node revision textfield)
core/modules/user/user.admin.inc:378 (additional picture settings)
... and I'm not even listing the ones in views...

If anything, there should be a follow up issue to standardize such explicit help text mechanism across Drupal's form API, but for consistency wrt to this particular issue and as a follow up of the patch #1 which was committed, I propose to remove the help text.

Niklas Fiekas’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs accessibility review

Good research, scor, thank you. Sounds reasonable.

Niklas Fiekas’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: +Needs accessibility review

Oh ... I didn't notice the tag. Adding it back on and back to NR to get an actual sign off from some accessibility expert.

mgifford’s picture

mgifford’s picture

Status: Needs review » Needs work

The last submitted patch, 7: 1552984_7_display_default_help_text.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Dries committed 3919577 on 8.3.x
    Patch #1552984 by Niklas Fiekas: Added Make 'File displayed by default'...

  • Dries committed 3919577 on 8.3.x
    Patch #1552984 by Niklas Fiekas: Added Make 'File displayed by default'...

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • Dries committed 3919577 on 8.4.x
    Patch #1552984 by Niklas Fiekas: Added Make 'File displayed by default'...

  • Dries committed 3919577 on 8.4.x
    Patch #1552984 by Niklas Fiekas: Added Make 'File displayed by default'...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

  • Dries committed 3919577 on 9.1.x
    Patch #1552984 by Niklas Fiekas: Added Make 'File displayed by default'...

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

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

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
quietone’s picture

Version: 9.3.x-dev » 8.0.x-dev
Issue summary: View changes
Status: Needs work » Fixed

This was committed to 8.x and re-opened the next day with asking 'Do we really need the description now that the field is displayed conditionally anyway?' This was followed by research that concluded that the description should be removed.

However, since then #2320877: Add a setting to make description a required field for file items was opened and a usability review was done on this part of the form and the removal of the description was not suggestion. Therefor, I am restoring the meta for this issue at the time it was closed. If you disagree, create a new issue and refer to this one.

Thanks.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.