Description
Kibana version: 8.x, 9.x
Describe the bug:
An h2 element is wrapping the panel title when the panel has a description, when not it just uses the panelTitleElement.
This h2 doesn't own its style, but is inherited. Unfortunately a style override (from a browser extensions for example) at the body/html level could wrongly updates the font-size of this header causing the title to be larger then the required size. EUI doesn't block this behaviour and the h2 is not styled to prevent that.
Steps to reproduce:
- create a dashboard with two panels, one with just the title, the other with title and description
- add a custom h2 style with font-size: 40px or more
- you will notice that the panel with description increases in font-size.
Expected behavior: It should behave as every other h2 elements aka EuiTitles and it should not be overwritten by custom styles.
Also the other wrong fact is that it has semantically a different meaning then the title without the description that is just a link or a span if in read-only mode.
Screenshots (if relevant):