You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Raimund Merkert (JIRA)" <ji...@apache.org> on 2011/05/01 07:55:03 UTC

[jira] [Created] (TIKA-650) Missing required alt attribute on img tag

Missing required alt attribute on img tag
-----------------------------------------

                 Key: TIKA-650
                 URL: https://issues.apache.org/jira/browse/TIKA-650
             Project: Tika
          Issue Type: Bug
          Components: parser
    Affects Versions: 0.9
            Reporter: Raimund Merkert


I've written a content handler that prints out the xhtml tags for conversion from a word document with embedded images. For images, it does not generate the "alt" attribute for img tags, which causes validation to fail. alt is a required attribute in XHTML.

Here's a partial output from [http://validator.w3.org/check]:

{quote}
Error Line 3, Column 1026: required attribute "alt" not specified

...meta><title> </title></head><body><p><img src="embedded:image63.jpg"></img></p>

✉

The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
{quote}


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Resolved] (TIKA-650) Missing required alt attribute on img tag

Posted by "Jukka Zitting (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TIKA-650?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jukka Zitting resolved TIKA-650.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0
         Assignee: Jukka Zitting

I added the missing alt attribute in revision 1104455.

> Missing required alt attribute on img tag
> -----------------------------------------
>
>                 Key: TIKA-650
>                 URL: https://issues.apache.org/jira/browse/TIKA-650
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.9
>            Reporter: Raimund Merkert
>            Assignee: Jukka Zitting
>             Fix For: 1.0
>
>
> I've written a content handler that prints out the xhtml tags for conversion from a word document with embedded images. For images, it does not generate the "alt" attribute for img tags, which causes validation to fail. alt is a required attribute in XHTML.
> Here's a partial output from [http://validator.w3.org/check]:
> {quote}
> Error Line 3, Column 1026: required attribute "alt" not specified
> ...meta><title> </title></head><body><p><img src="embedded:image63.jpg"></img></p>
> ✉
> The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
> Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TIKA-650) Missing required alt attribute on img tag

Posted by "Nick Burch (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027438#comment-13027438 ] 

Nick Burch commented on TIKA-650:
---------------------------------

Not sure what we should be putting into the alt attribute - word documents for example don't have alt text for their images so we don't have any useful information to populate the attribute with

> Missing required alt attribute on img tag
> -----------------------------------------
>
>                 Key: TIKA-650
>                 URL: https://issues.apache.org/jira/browse/TIKA-650
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.9
>            Reporter: Raimund Merkert
>
> I've written a content handler that prints out the xhtml tags for conversion from a word document with embedded images. For images, it does not generate the "alt" attribute for img tags, which causes validation to fail. alt is a required attribute in XHTML.
> Here's a partial output from [http://validator.w3.org/check]:
> {quote}
> Error Line 3, Column 1026: required attribute "alt" not specified
> ...meta><title> </title></head><body><p><img src="embedded:image63.jpg"></img></p>
> ✉
> The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
> Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (TIKA-650) Missing required alt attribute on img tag

Posted by "Raimund Merkert (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TIKA-650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027481#comment-13027481 ] 

Raimund Merkert commented on TIKA-650:
--------------------------------------

I know, but it's a required attribute. So I would just make an empty attribute.

Personally, I can always work around this my having my own content handler inject an alt attribute for img tags. But generally speaking, this sort of behavior needs to be documented at the very least. I don't know if there are any other tags where required attributes are not provided either. 


> Missing required alt attribute on img tag
> -----------------------------------------
>
>                 Key: TIKA-650
>                 URL: https://issues.apache.org/jira/browse/TIKA-650
>             Project: Tika
>          Issue Type: Bug
>          Components: parser
>    Affects Versions: 0.9
>            Reporter: Raimund Merkert
>
> I've written a content handler that prints out the xhtml tags for conversion from a word document with embedded images. For images, it does not generate the "alt" attribute for img tags, which causes validation to fail. alt is a required attribute in XHTML.
> Here's a partial output from [http://validator.w3.org/check]:
> {quote}
> Error Line 3, Column 1026: required attribute "alt" not specified
> ...meta><title> </title></head><body><p><img src="embedded:image63.jpg"></img></p>
> ✉
> The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element.
> Typical values for type are type="text/css" for <style> and type="text/javascript" for <script>.
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira