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.
This can be seen at http://dev.demo-olivero.local/form/example-accessibility-labels
Problem/Motivation
If we don't set a legend (#title) for a fieldset, there is no padding for this element
With a legend:
Without a legend:
Steps to reproduce
Display a fieldset without legend
Proposed resolution
As the problem is coming from the .fieldset__legend--visible
class which is only there when a legend exist, my proposal is to remove this class in the css rules to apply the padding for all fieldset.
In css/components/fieldset.pcss.css
, change this
.fieldset__legend--visible ~ .fieldset__wrapper {
margin-block-start: 0;
padding-block: var(--sp);
padding-inline-start: var(--sp);
padding-inline-end: var(--sp);
}
into this:
.fieldset__wrapper {
margin-block-start: 0;
padding-block: var(--sp);
padding-inline-start: var(--sp);
padding-inline-end: var(--sp);
}
Let me know what you think
Comment | File | Size | Author |
---|---|---|---|
#26 | Screenshot 2022-12-27 at 12.19.43 PM.png | 191.63 KB | andy-blum |
#26 | Screenshot 2022-12-27 at 12.20.04 PM.png | 181.68 KB | andy-blum |
#25 | 3195828-25.patch | 1.12 KB | ameymudras |
| |||
#23 | interdiff_3195828_15-20.txt | 1.12 KB | _pratik_ |
#23 | 3195828-22.patch | 1.32 KB | _pratik_ |
Comments
Comment #2
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commentedI have provided the patch with the possible solution you suggested, please review.
Comment #3
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commentedComment #4
DuneBLMany thanks, looks good to me
But I don't know why the the failed...
Comment #5
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commentedRemoved a white empty line, let's hope if it works.
Comment #6
Gauravvvv CreditAttribution: Gauravvvv at OpenSense Labs commentedPlease review if this is working or not.
Comment #7
DuneBLHello, I confirm that patch apply cleanly and is doing the job!!
Thank you.
Comment #8
ilgnerfagundes CreditAttribution: ilgnerfagundes at CI&T commentedI reviewed the modifications to patch #6, and it looks fine., rtbc +1
Comment #9
lauriiiCan we document steps for reproducing this? I tried to create fieldset with invisible legend but it looks different:
Comment #10
djsagar CreditAttribution: djsagar at OpenSense Labs commentedFor this issue to replicate i added fieldset in user login form.
You can also use fieldset module for this.
@Gauravmahlawat patch is applied resolved above issue.
RTBC +1 for patch
Thanks!
Comment #11
Abhijith S CreditAttribution: Abhijith S as a volunteer and at Zyxware Technologies commentedApplied patch #6 and it works fine.Adding screenshots below.
Before patch:
After path:
RTBC +1
Comment #12
mherchelNeeds re-roll
Confirmed this is still happening. You can view this on http://dev.demo-olivero.local/form/example-accessibility-labels
Comment #13
mherchelComment #15
cindytwilliams CreditAttribution: cindytwilliams at Kanopi Studios commentedRe-rolling patch #6
Comment #16
anish.a CreditAttribution: anish.a at QBurst commentedComment #17
mherchelConfirmed this is still happening.
Comment #18
xjmNormal priority bug under the normal issue priority definition:
Comment #22
andy-blumPatch no longer applies.
Comment #23
_pratik_ CreditAttribution: _pratik_ as a volunteer and at Specbee for Drupal India Association commentedRerolled for 10.1.x
Patch applying cleanly for me.
Comment #24
andy-blumPer tests, patch does not apply.
Comment #25
ameymudras CreditAttribution: ameymudras at Salsa Digital commentedTrying to fix the issue with the above patch
Comment #26
andy-blumPadding remains regardless of fieldset legend. RTBC.
Comment #27
andy-blumComment #29
lauriiiCommitted 0498fbf and pushed to 10.1.x. Thanks!