[ https://issues.apache.org/jira/browse/DOXIA-619?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Osipov closed DOXIA-619. -------------------------------- Resolution: Fixed Fixed with [87d1ab3979d9df3f6c9af2b2c9bb3baf4152d8b1|https://gitbox.apache.org/repos/asf?p=maven-doxia.git;a=commit;h=87d1ab3979d9df3f6c9af2b2c9bb3baf4152d8b1]. > Sink.sectionTitle1() creates <h2> instead of <h1> > ------------------------------------------------- > > Key: DOXIA-619 > URL: https://issues.apache.org/jira/browse/DOXIA-619 > Project: Maven Doxia > Issue Type: Bug > Components: Module - Xhtml, Sink API > Reporter: Bertrand Martin > Assignee: Michael Osipov > Priority: Major > Fix For: 2.0.0-M3 > > > h1. Problem > The below code in a Maven Report plugin: > {code:java} > Sink mainSink = getSink(); > mainSink.section1(); > mainSink.sectionTitle1(); > mainSink.text("Release Notes"); > mainSink.sectionTitle1_(); > {code} > produces this HTML: > {code:html} > <h2 id="Release_Notes">Release Notes</h2> > {code} > Expected HTML was {{<h1>}} instead of {{<h2>}}: > {code:html} > <h1 id="Release_Notes">Release Notes</h1> > {code} > 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|https://www.w3.org/WAI/tutorials/page-structure/headings/]. > h1. 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. > h1. Doc > N/A > h1. Tests > Add corresponding unit and integration tests. This should not break > *maven-site-plugin*'s own integration tests. -- This message was sent by Atlassian Jira (v8.20.7#820007)