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.
Updated: Comment 0
Problem/Motivation
When you test a random block patch and move a block to the footer region you will realize that the title of the block is not displayed, see bartik/css/style.css
#footer .block > h2 {
/* @extend .visually-hidden */
position: absolute !important;
clip: rect(1px, 1px, 1px, 1px);
overflow: hidden;
height: 1px;
}
I can't really imagine that this is part of the exception of users, if they want to hide it, they can just do it.
Proposed resolution
- Change the default value to '0' (disabled) for label_display attribute in bartik_footer block.
- Fix the menu links styles when the title is disabled on footer_fifth region.
- Remove the dotted line on the bottom of these menu links in order to enhance presentation.
- Fix style issues that prevent to easily read block titles in footer.
Remaining tasks
User interface changes
API changes
Comment | File | Size | Author |
---|---|---|---|
#46 | 2148319-45-after.png | 128.03 KB | idebr |
#45 | footer-block-title-visibility-2148319-45.patch | 1.25 KB | joshtaylor |
#41 | footer-block-title-visibility-2148319-41.patch | 1.32 KB | crazyrohila |
#38 | footer-block-title-visibility-2148319-38.patch | 1.32 KB | crazyrohila |
#36 | footer-block-title-visibility-2148319-36.patch | 1.28 KB | Manjit.Singh |
Comments
Comment #1
tim.plunkettThis was in D7, see #845834: Fix Bartiks Header because its totally borked and bartik_preprocess_block (D7)
This was changed to hardcoded CSS in #1968360: Remove per-region block markup, which is a technically a regression.
Comment #2
poojakural CreditAttribution: poojakural commentedI found block title visible on other footer section but only hide on main footer section. If we remove this css then block title would start appear
Comment #3
RavindraSingh CreditAttribution: RavindraSingh commentedProcessing the patch for review.
Comment #4
emma.mariaWe unfortunately can't just remove the CSS that hides the titles. This is because as part of the Bartik design and certain blocks assigned to regions on install we do not want to show their titles.
See screenshot....
Therefore we need to consider how we can turn the block title visibility off by default for the footer items as well as getting rid of the CSS that hides them.
Comment #5
emma.mariaComment #6
idebr CreditAttribution: idebr commented@emma.maria Some block titles are disabled by default by the install profiles, for example Bartik breadcrumbs in the Standard profile ('label_display'):
core\profiles\standard\config\install\block.block.bartik_breadcrumbs.yml
So the block title can be disabled by default, but the title should at least look decent if a site builder enable its, don't you think?
Comment #7
tim.plunkett@idebr Agreed, we should do both.
Comment #8
emma.mariaYes I agree. There is an existing issue for the footer block titles somewhere. I also experimented with the block install files to make sure I was on the right track with my instructions :) so yes let's do it!
Comment #9
juankvillegas CreditAttribution: juankvillegas commentedWe worked on this issue in Thursday's Sprint Code in DrupalCon LatinAmerica.
This patch was created with peer programming by juankvillegas, jidrone, ibustos, davidlfg, geffio, fredysan and andres-mejia
Comment #10
ibustosI went ahead and applied the patch in #9 and using the minimal profile along with Bartik, created a new custom block and added it to footer five. I can confirm the title does show up.
Comment #11
jclema CreditAttribution: jclema commentedComment #12
jidrone CreditAttribution: jidrone commentedI used the patch in #9 with a standard profile installation, and it works for me.
Also, I saw the new menu links styling and looks pretty good.
Comment #13
juankvillegas CreditAttribution: juankvillegas commentedHere is the final result:
Comment #14
tim.plunkettIt's not clear why there are changes to
a
styling here, this is about H2?AFAIK the H2 is not a link here.
The screenshot in #13 shows that the header text is not legible.
Comment #15
juankvillegas CreditAttribution: juankvillegas commentedThere are changes needed to the styling because only removing the css that hides the H2 title converts the links to blue (check patch in #2)... so, there must be added some styles to put those links almost white again.
The titles are not legible, but they are not legible on all the footer area, and this issue was affecting only the Footer Fifth region, that's why we decided to do not include a fix for it here... I think it must be a separate issue.
Comment #16
tim.plunkettIn HEAD, there is no way to get a block title in the footer that violates our accessibility rules.
This patch now allows site builders to cause accessibility problems. Therefore it is the responsibility of this issue to fix it.
See #6, #7, and #8.
Comment #17
juankvillegas CreditAttribution: juankvillegas commentedActually in any Footer region from First to Fourth, titles can be normally enabled/disabled.
I'll search for the titles legibility issue and try to fix it too.
Comment #18
juankvillegas CreditAttribution: juankvillegas commentedI did a quick (but responsible) research and I didn't find any issue related with titles legibility.
Comment #19
juankvillegas CreditAttribution: juankvillegas commentedFixed style issues that prevent to easily read block titles in footer.
Here is the final result with all the changes applied:
Comment #20
juankvillegas CreditAttribution: juankvillegas commentedI just removed a commented style in #19
Comment #21
juankvillegas CreditAttribution: juankvillegas commented... and here are the styles with titles disabled in Footer Bottom section:
Comment #22
juankvillegas CreditAttribution: juankvillegas commentedComment #23
idebr CreditAttribution: idebr commentedPatch no longer applies after #2422363: Rewrite the menu CSS components inline with our CSS standards was committed:
error: patch failed: core/themes/bartik/css/components/footer.css:115
error: core/themes/bartik/css/components/footer.css: patch does not applyt
Comment #24
emma.mariaThe latest patch has caused design regressions to the footer_first to footer_fourth regions (lost the border and the spacing). The original intention of this issue was to fix the hidden by CSS force H2 titles in the footer which only occurs in the footer_fifth region and not the column regions.
The patch needs to be amended to keep the original layout and style of all the footer regions and only affect the H2 titles. If the styling to fix the footer_fifth title improves footer_first to fourth, by using a useful reusable CSS selector for all regions I am all for that.
Otherwise leave the other regions alone as there is an existing issue for footer first to fourth regions titles (which have correct visibility behaviour but bad contrast) here #2304971: Change default block title colors in Footer first to fourth regions to improve contrast.
Comment #25
prateekS CreditAttribution: prateekS commentedComment #26
prateekS CreditAttribution: prateekS commentedComment #27
prateekS CreditAttribution: prateekS commentedI am not able to reproduce this issue. I guess problem is title of blocks should not visible if blocks on footers not enable. Which i tried by enabling/disabling blocks on footer regions but not able to find this issue. Is this resolved .
Comment #28
crazyrohila CreditAttribution: crazyrohila commentedStill issue exist. I have enable the title of fifth block, but not able to see in footer block. and visiblity of other first-to-forth column block title is also not so clear.
Working on reroll.
Comment #29
crazyrohila CreditAttribution: crazyrohila commentedRerolled patch.
Comment #31
Chloe Chen CreditAttribution: Chloe Chen commentedupdated footer region one to four title color to be #ffffff, to increase contrast and differ from link color
Comment #32
crazyrohila CreditAttribution: crazyrohila commented@chloe I think this patch should be on https://www.drupal.org/node/2304971.
Scope of this issue is, just show title of footer_bottom/footer_fifth when user checked 'display title' in block configuration.
Comment #33
crazyrohila CreditAttribution: crazyrohila commentedPass to bot...
Comment #34
tim.plunkettPlease combine the last two patches. We can't introduce a visual regression. Pretty sure we had this conversation already.
Comment #36
Manjit.SinghCombining last two patches :)
Comment #37
crazyrohila CreditAttribution: crazyrohila commented@tim, sorry was not aware of.
@manjit,
color should be the same as we have for `.content`.
Comment #38
crazyrohila CreditAttribution: crazyrohila commentedAs per above comment, block title should have same color as block content.
Comment #40
LewisNymanI think the test is failing because this should not be an integer
In previous patches, the value was a string
Comment #41
crazyrohila CreditAttribution: crazyrohila commentedLet's see now.
Comment #42
Manjit.SinghLooks good now :) I think we have to close it now.
Comment #45
joshtaylor CreditAttribution: joshtaylor commentedhttps://www.drupal.org/node/2398451 broke this patch?
Straight reroll.
Comment #46
idebr CreditAttribution: idebr commentedThanks @joshtaylor! Did a manual test to confirm the title is now displayed correctly when the title is not hidden:
Comment #47
alexpottCSS is not frozen in beta. Committed 66af922 and pushed to 8.0.x. Thanks!