Problem/Motivation

h2 tags seem too small in Olivero theme.
In fact it's slightly smaller than h3 tags.

Here's a screenshot:
Screenshot of all heading tags

I looked into computed size for each heading tag and here's the result:
h1: 60px
h2: 21px
h3: 21.06px
h4: 18px
h5: 14.94px
h6: 12.06px

h2 & h3 are pretty much the same except that h2 has bigger letter spacing and a slightly darker color.
Also, the size difference between h1 & h2 is jarring. Out of the box in chrome the h2 (1.5em) is 3/4th the size of h1 (2em).
Here, it is 1/3rd the size of h1.

Steps to reproduce

  1. Install Drupal & Set Olivero as default theme
  2. Create a basic page and add all heading tags in the body field.

Proposed resolution

Incease the size of h2 tag. 28-32 pixels looked good to me, but I'll defer the decision to design team for Olivero.

Remaining tasks

User interface changes

Yes, h2 gets bigger if this is implemented.

After Patch

API changes

Data model changes

Release notes snippet

Comments

dipakmdhrm created an issue. See original summary.

dipakmdhrm’s picture

Issue summary: View changes
dipakmdhrm’s picture

Issue summary: View changes
dipakmdhrm’s picture

Issue summary: View changes
dipakmdhrm’s picture

Issue summary: View changes
dipakmdhrm’s picture

Issue summary: View changes
andy-blum’s picture

Priority: Major » Minor
Status: Active » Closed (works as designed)

The design of Olivero has been finalized and the font size of the headings is not a bug or accessibility concern. Closing this ticket.

dipakmdhrm’s picture

Status: Closed (works as designed) » Active
StatusFileSize
new145.86 KB

@andy-blum. Thanks for your input.
But I'd argue that there is some accessibility concern here.
Someone with a slightly blurred vision, or someone with watering eyes might not be able to clearly identify between a h3 and h2 tag.

Example:

dipakmdhrm’s picture

I'd also like to upgrade this from 'minor' to 'normal' if not 'major' as headings are very important part of design. They should be hierarchical not only in importance for screen readers but also in terms of design for vision.

dipakmdhrm’s picture

Priority: Minor » Normal
andy-blum’s picture

Status: Active » Closed (won't fix)

But I'd argue that there is some accessibility concern here.
Someone with a slightly blurred vision, or someone with watering eyes might not be able to clearly identify between a h3 and h2 tag.

The importance of difference between h2 and h3 is minimal for sighted users as their position on the page and within the flow of the content helps differentiate them and define their role as headings. The more important reason to have H2 vs H3 is to allow assistive tech users to differentiate because they might not have those other visual cues.

I'd also like to upgrade this from 'minor' to 'normal' if not 'major' as headings are very important part of design. They should be hierarchical not only in importance for screen readers but also in terms of design for vision.

I don't disagree in principle, but the design is finalized and without pointing to a specific rule to support that this is in fact a WCAG violation, it won't be addressed.

mherchel’s picture

Status: Closed (won't fix) » Active

This page doesn't show the issue https://tugboat-aqrmztryfqsezpvnghut1cszck2wwasr.tugboat.qa/admin/appear...

I wonder if the reason the h2 font is smaller is because it's a block title. If so, we should be styling against that CSS class.

dipakmdhrm’s picture

@andy-blum, It looks like there's some misunderstanding between finalized design. The style guide for headings in link that @mherchel provided is perfect! There you can see h2 is much better sized when compared to h1 & h3.

However, it's not the case in current implementation of Olivero.

At first I thought it might be because I was testing in 9.2.x and this could've been already fixed in 9.3.x. But nope, it's still there. I tested it in latest 9.3.x.

Also @mherchel, this is not for block titles. This is for text entered in CKEditor in articles. Here are screenshots:

Visually in editor:

Source in editor:

On page:

andy-blum’s picture

That styling is coming from text-content.css and was committed as part of issue #3111409: Add new Olivero frontend theme to Drupal 9.1 core as beta It's also in Lullabot's olivero-poc repository (git blame), but I'm not sure why it was originally authored that way.

mherchel’s picture

Yeah, that was over a year ago. I'll look back through that commit log to see see what problem I was solving. Either way, I do agree we need to resolve this. Adding to #3177296: [META] Make Olivero stable as a should have.

mherchel’s picture

Did a bit of comparison between the .text-content style headings and the generic ones:

heading .text-content default
h1 60 60


h2 21 36
h3 21.06 18.72
h4 18 16
h5 14.94 13.28
h6 12.06 10.72
mherchel’s picture

Note that the "default" styling for h3, h4, h5, and h6 is just the user agent styling!

mherchel’s picture

The relevant Figma file is at https://www.figma.com/file/RZvmE8xMixA4NWGmPphija/D9-Theme---Design-Revi..., but it appears to be outdated. We've since ditched the all caps variant, and they don't match with the article mock at https://www.figma.com/file/r8uq72Q9weTMVsNUFZKEYH/D9-Theme-Master?node-i...

mherchel’s picture

Assigned: Unassigned » mherchel

Talked with @jwitkowski79, and she said to yank the special h2 styling for the text-content. We will also then explicitly style all of the other headings. After this is done, she will need to give approval

macmladen’s picture

The hard core attitude of @andy-blum that is so widespread among Drupal projects and Drupal core is the main reason why many juniors are afraid to even try to help and others are just repulsed.

I would suggest refraining from such a stance and offer a polite explanation and a hand in understanding the rationale behind any decision.

Like many of the developers in the Bootstrap issue queue about including Bootstrap 4 in the theme, I was repulsed by a maintainer who had that God attitude and happily switched to Radix which is a much better choice anyway and maintainers are very positive about any issue and he also accepted co-maintainers to help with development.

With great respect for the work poured into the theme from the whole team and the great attitude of @mhercel I would plea that anyone should learn and try to follow the same principle while trying to make both Olivero and Drupal a better thing.

Having a good pace by addressing issues and not allowing them years to hold on with a wide community and efficient contribution handling is a key for a theme that will truly live a good life on the core (as it does not need to fight for the position anymore).

mherchel’s picture

Title: Font size for h2 tag is smaller than h3 » Olivero: Ensure proper visual hierarchy between headings
Version: 9.2.x-dev » 9.3.x-dev
Status: Active » Needs review
Issue tags: -olivero +CSS, +design
StatusFileSize
new4.59 KB

Patch attached. I'll be going over this with our designer later today.

mherchel’s picture

Going over this with @jwitkowski79 right now. Tugboat link https://headings-otwsr9tpcot5mdxbhmtwrvmvvhxj3vy2.tugboat.qa/node/61

jwitkowski79’s picture

@mherchel This looks good!

mherchel’s picture

Thanks! The code in the patch still needs to be reviewed if anyone wants to take a look.

gauravvvv’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new50.98 KB

RTBC +1. Now the heading are following visual hierarchy between them.

h1: font-size: 3.75rem;
h2: font-size: 2.25rem;
h3: font-size: 1.5rem;
h4: font-size: 1.125rem;
h5: font-size: 1rem;
h6: font-size: 0.875rem;

mherchel’s picture

Assigned: mherchel » Unassigned

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 21: 3225188.patch, failed testing. View results

mherchel’s picture

Status: Needs work » Reviewed & tested by the community

Unrelated test failure.

  • lauriii committed 45d92a9 on 9.3.x
    Issue #3225188 by mherchel, dipakmdhrm, Gauravmahlawat, jwitkowski79:...

  • lauriii committed dfd665f on 9.2.x
    Issue #3225188 by mherchel, dipakmdhrm, Gauravmahlawat, jwitkowski79:...
lauriii’s picture

Version: 9.3.x-dev » 9.2.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 45d92a9 and pushed to 9.3.x. Also cherry-picked to 9.2.x because Olivero is experimental. Thanks!

Status: Fixed » Closed (fixed)

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