Proposal: Modal title font size

Hello!

Context

Modal titles are divs, not headings, so that they don’t break the headings hierarchy (XWIKI-15726). Back in 2018, we gave them a fixed font size matching H4 at the time.

Since then, XWIKI-21333 changed the heading sizes and made them fluid with the window width. The modal title size wasn’t updated, so it doesn’t match any heading anymore:

Narrow window Wide window
Modal title 20px 20px
H3 18px 20px
H4 16px 17px

We noticed this when doing the conversion of modals.less to CSS. It’s tracked in XWIKI-25177.

Proposal

  1. Use the H3 font size var(--font-size-h3) for modal titles.
  2. Use the H4 font size var(--font-size-h4) for modal titles.
  3. Use headings directly and drop this custom style.

Opinion

+1 for 1 because:

  • It’s almost identical to the current size on a wide window, so the UI barely changes.
  • Modal titles follow the heading scale again, including on small screens, and we avoid keeping a hard-coded value.

@MichaelHamann proposed option 1 back on the initial discussion so I assume that’s another +1 for it.

Conclusion

Do you agree with using the H3 font size for modal titles? Do you prefer another option?

I’ll close this topic in a week and propose an implementation of its result if it doesn’t spur a large discussion.

Thank you!
Lucas C.

PS. I’ve been looking at XWIKI-15726 and it seems like we’d better use an H2 semantic here, but it’s an unrelated problem.

+1

Thanks,
Marius

Hi, +1 for 1 for me.
Thanks.

+1 thanks

Thanks for all your feedback!
Closing this proposal with 4 +1 and reporting the result of the discussion at Loading...