Utilizing Bootstrap allows for the adjustment of paragraph font sizes to appear quite large, mimicking the size and style of a heading without the need for an actual heading level HTML tag.
I am hesitant to use a genuine <H2>
tag to alter the visual display of this text, as it is considered secondary content located in the footer of the site with no content before or after it, and I want to maintain the document outline.
<p class="h2">This is a very large stand-alone slogan text.</p>
https://i.sstatic.net/XikRh.png
Although, accessibility checkers are warning that:
The line-height in paragraphs should be at least 1.5 times the font size.
The W3C's guidelines on visual presentation highlight:
https://www.w3.org/WAI/WCAG21/Understanding/visual-presentation.html
The line spacing within paragraphs should be at least one and a half times the font size, with paragraph spacing being at least 1.5 times greater than line spacing.
The concern arises from the fact that the heading styles on this site have a line height of 1.2, providing a visually appealing layout with sufficient white space.
Consequently, I believe this warning is a false positive.
Is there a recommended method to prevent this line-height warning? Should I consider using a <div>
or another HTML5 tag instead? Any suggestions?