[ 
https://issues.apache.org/jira/browse/DOXIA-619?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17543503#comment-17543503
 ] 

ASF GitHub Bot commented on DOXIA-619:
--------------------------------------

asfgit closed pull request #99: [DOXIA-619] Sink.sectionTitle1() creates <h2> 
instead of <h1>
URL: https://github.com/apache/maven-doxia/pull/99




> 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)

Reply via email to