[ 
https://issues.apache.org/jira/browse/TOMAHAWK-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12609117#action_12609117
 ] 

Simon Kitching commented on TOMAHAWK-1291:
------------------------------------------

Changing the renderers to write style"background:xxxx" is just good coding. It 
makes things xhtml compliant without any negatives, and it would be great if 
you have time to do that. Really appreciated.

Writing out an image element with an ALT attribute set to an empty string is a 
completely different issue. IMO any myfaces code that does this is simply 
wrong.  Buggy. Invalid.

Writing an image without providing an ALT string is just saying "F*** Y**" to 
every computer user who uses a screen reader to access the web (plus every user 
who uses a text-only browser). That's why the xhtml specification says it is 
mandatory, and fails to validate such pages.

Writing an image with the ALT attribute set to an empty string is like saying 
"**Y ***F" to every blind user. It may pass a simple obscenity checker, but 
that doesn't mean it is any politer.

So IMO, all MyFaces components that internally generate image elements need to 
output decent ALT text for them. This is not so hard, we know what the image is 
for. When a component renders a "row selector" icon, or a "tree node expand" 
icon or similar, it just needs to output the appropriate description along with 
the image. Writing an empty string is a dishonest solution that is simply lying 
to the xhtml validator, pretending we have output a sensible description when 
we have not.

The h:graphicImage and t:graphicImage tag renderers are a special case. Here we 
simply cannot provide a sensible ALT description, because we have no idea what 
the image is for. So the user *has* to provide the alt text. If they don't, 
then we should not invent one, but just instead output invalid xhtml; the user 
can fix this by defining the ALT text.

Please feel free to start a thread on the mailing list if you would like to see 
wider discussion. This is of course just my opinion - but I cannot see any 
justification for alt="" at all.

And by the way, many thanks for working on making myfaces xhtml-compliant; it's 
worth doing - but should be done right.

> t:graphicImage doesnot generate XHTML complaint code
> ----------------------------------------------------
>
>                 Key: TOMAHAWK-1291
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1291
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>    Affects Versions: 1.1.7-SNAPSHOT
>            Reporter: Hazem Saleh
>            Assignee: Hazem Saleh
>             Fix For: 1.1.7-SNAPSHOT
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to