openhtmltopdf
openhtmltopdf copied to clipboard
<br> in <dd> causes PDF/UA validation warnings
If I have a multi-line <dd>
content, I get "Possibly inappropriate use of a "Span" structure element" warnings in PAC2021.
The HTML is
<html lang="en-US">
<head>
<title>DD test</title>
</head>
<body>
<dl>
<dt>Foo</dt>
<dd>Bar<br>Baz
</dd>
</dl>
</body>
</html>
The resulting PDF is dd-test.pdf
Screen reader preview:
Structure view
I managed to work around the issue by adding:
dd br {
display: block;
line-height: 0;
}