You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Lukas Theussl (JIRA)" <ji...@codehaus.org> on 2008/02/25 10:08:31 UTC
[jira] Commented: (DOXIA-75) XhtmlSink#figureCaption() writes an
"alt" attribute, but a "title" attribute would also be appropriate
[ http://jira.codehaus.org/browse/DOXIA-75?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_124927 ]
Lukas Theussl commented on DOXIA-75:
------------------------------------
Working on DOXIA-227 I notice that the handling of images in BaseXhtmlSink and Parser is not what I expected. As I noted above, IMO figureCaption() should not write any alt or title attributes to the img tag. I think these sink events:
{code}
sink.figure();
sink.figureGraphics( "image.gif" );
sink.figureCaption();
sink.text( "Caption");
sink.figureCaption_();
sink.figure_();
{code}
should lead to something like the following HTML output:
{code:xml}
<div class="figure">
<p><img src="image.gif"/></p>
<p>Caption</p>
</div>
{code}
while currently it's just
{code:xml}
<img src="image.gif" alt="Caption"/>
{code}
IMO the figure() event should start a block-level, floating image with corresponding caption, while figureGraphics() alone can be used to insert in-line images. This change will not break any source document parsing and rendering, but there will be a backward problem for java classes where events are directly emitted into a sink. Eg the LinkcheckReport Mojo in maven-linkcheck-plugin has the following method for error icons (but I'm pretty sure this was copied from somewhere else):
{code}
private void iconError( Locale locale )
{
getSink().figure();
getSink().figureCaption();
getSink().text( i18n.getString( "linkcheck-report", locale, "report.linkcheck.icon.error" ) );
getSink().figureCaption_();
getSink().figureGraphics( "images/icon_error_sml.gif" );
getSink().figure_();
}
{code}
With DOXIA-204 this would have to be replaced by
{code}
private void iconError( Locale locale )
{
getSink().figureGraphics( AttributeSet );
}
{code}
where AttributeSet contains the src and alt (and other) attributes.
> XhtmlSink#figureCaption() writes an "alt" attribute, but a "title" attribute would also be appropriate
> ------------------------------------------------------------------------------------------------------
>
> Key: DOXIA-75
> URL: http://jira.codehaus.org/browse/DOXIA-75
> Project: Maven Doxia
> Issue Type: Improvement
> Components: Core
> Affects Versions: 1.0-alpha-8
> Reporter: Fabrice BELLINGARD
> Assignee: Fabrice BELLINGARD
> Priority: Trivial
> Fix For: 1.0-beta-2
>
>
> It's nice to see the figure caption in a tooltip, so maybe both "alt" and "title" should be written.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira