Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Problem
The below code in a Maven Report plugin:
Sink mainSink = getSink();
mainSink.section1();
mainSink.sectionTitle1();
mainSink.text("Release Notes");
mainSink.sectionTitle1_();
produces this HTML:
<h2 id="Release_Notes">Release Notes</h2>
Expected HTML was <h1> instead of <h2>:
<h1 id="Release_Notes">Release Notes</h1>
As a consequence, documents produced using the Sink API in a Maven Report plugin do not have any <h1> headings and start directly with <h2>, which is not recommended for SEO, and most importantly for accessibility.
Specification
Fix the mapping of section levels to HTML heading levels in Xhtml5BaseSink and XhtmlBaseSink (see protected void onSectionTitle( int depth, SinkEventAttributes attributes )).
Similarly (and this is riskier), update baseStartTag() and baseEndTag() methods in Xhtml5BaseParser and XhtmlBaseParser classes.
Doc
N/A
Tests
Add corresponding unit and integration tests. This should not break maven-site-plugin's own integration tests.