Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, thanks for a great module.
It seems the Visually Hidden setting for label does not have any effect, that is assuming the setting is designed to have the effect inherent in setting the D8 class visually-hidden? Using Drupal 8.3.4 and DS 8.x-3.1
Comment | File | Size | Author |
---|---|---|---|
#7 | 2893331-7.patch | 2.27 KB | swentel |
#6 | 2893331-6.patch | 2.27 KB | swentel |
Comments
Comment #2
jazzper CreditAttribution: jazzper commentedThe Display Suite field templates don't add a
visually-hidden
class but afield-label-visually-hidden
class. Therefore the CSS that hides the element doesn't get applied.As an example the part from ds-field.reset.html.twig responsible for this:
Comment #3
PieterDCStill occurs with Display Suite 8.x-3.2
The bug also occurs with the expert and minimal templates, not only the reset template.
Should we add 'visually-hidden' to 'field-label-visually-hidden' to be backwards compatible?
But then still FieldTemplateTest will probably need some adjustments to keep working.
Comment #4
nhck CreditAttribution: nhck commentedYes please! The issue persists in Drupal 8.8 with Display Suite 8.x-3 - and its really confusing.
Inspired by a related issue #2779743: Hidden/Visually hidden field labels don't work in the basic theme and for a quick fix - I've modified the following lines in ds-field-expert.html.twig
So they now read:
Comment #5
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedHmm, yeah, this is confusing indeed.
We should apply this to expert, minimal and (even) reset, let me see if I can make it work.
Comment #6
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedThis also adds visually hidden to the labels of display suite fields.
Comment #7
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedPatch didn't apply anymore, will commit when green.
Comment #9
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commentedcommitted and pushed, sorry for the delay.
Comment #10
swentel CreditAttribution: swentel at eps & kaas for Dropsolid commented