[jira] Commented: (TOMAHAWK-1291) t:graphicImage doesnot generate XHTML complaint code
[ https://issues.apache.org/jira/browse/TOMAHAWK-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12609182#action_12609182 ] Manfred Geiler commented on TOMAHAWK-1291: -- +1 for a strict (but sweet-tempered) behaviour that means: - log a nag warning - render a non-empty alt attribute with a meaningful default text if the developer omits the attribute (or provides an empty one) 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.
[jira] Commented: (TOMAHAWK-1291) t:graphicImage doesnot generate XHTML complaint code
[ https://issues.apache.org/jira/browse/TOMAHAWK-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12609117#action_12609117 ] Simon Kitching commented on TOMAHAWK-1291: -- Changing the renderers to write stylebackground: 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.
[jira] Commented: (TOMAHAWK-1291) t:graphicImage doesnot generate XHTML complaint code
[ https://issues.apache.org/jira/browse/TOMAHAWK-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12609005#action_12609005 ] Hazem Saleh commented on TOMAHAWK-1291: --- I think being XHTML complaint is essential for our component. Fixing this issue helps also to fix the following : https://issues.apache.org/jira/browse/TOMAHAWK-1143 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.
[jira] Commented: (TOMAHAWK-1291) t:graphicImage doesnot generate XHTML complaint code
[ https://issues.apache.org/jira/browse/TOMAHAWK-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12609006#action_12609006 ] Hazem Saleh commented on TOMAHAWK-1291: --- I can rollback this change if being XHTML complaint is not essential for the components. 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.
[jira] Commented: (TOMAHAWK-1291) t:graphicImage doesnot generate XHTML complaint code
[ https://issues.apache.org/jira/browse/TOMAHAWK-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12609009#action_12609009 ] Simon Kitching commented on TOMAHAWK-1291: -- The point I was making is that even with this patch, the component is not compliant with the spirit of the xhtml specification. Silencing schema validation errors by writing a blank ALT attribute is like fixing an exception by catching and ignoring it. There is a *reason* why the specification requires an alt property. IMO, if people want their apps to generate valid XHTML, then they *must define* alt attributes on the images in their pages. If they don't do that, then nothing we can do can make the page *semantically* valid. We could possibly do this: if (uiComponent.getAttributes().get(HTML.ALT_ATTR) == null) { log.warn(No alt attribute defined on t:graphicImage, so the output is not valid xhtml. + If you want valid XHTML, then define an alt attribute on the component.); } An alternative would be to just throw an exception, but I think that is too strict. People should be allowed to generate invalid xhtml if they want. The TOMAHAWK-1143 then should be solved differently. Again, to be truly valid xhtml (rather than just pass schema validation) it needs to provide a *meaningful* value for the alt attribute. So it needs to provide one, either by using a fixed alt text (eg Tree Node Expander) [1] or by allowing the user to define the text on the t:tree2 component. I'm not sure which of those is more appropriate, as I haven't looked at t:tree2 in detail. Generating XHTML-compliant output is a very good goal. But IMO this patch is just not the right solution here. [1] localised, of course, into the user's language. 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.
[jira] Commented: (TOMAHAWK-1291) t:graphicImage doesnot generate XHTML complaint code
[ https://issues.apache.org/jira/browse/TOMAHAWK-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12609011#action_12609011 ] Hazem Saleh commented on TOMAHAWK-1291: --- When I checked the (HTMLTreeRenderer) yesterday, - I found many empty image alts + td style=background: / instead of td background=xxx/ for example) out.writeAttribute(HTML.ALT_ATTR, , null); // alt is a mandatory xhtml attribute (((and out.writeAttribute(HTML.STYLE_ATTR, background-image: + lineSrc + ;, null); //we use style because background is no valid xhtml attribute for td and I saw other parts of the code that is not XHTML complaint and I think that Manfred was intending to fix these non complaint parts, so for the sake of consistency I followed the old pattern and fixed all the non complaint XHTML parts to solve the (TOMAHAWK-1143). I really don't know what we should do (should we just warn users or not allowing the non-complaint XHTML). We can check what other projects like Trinidad does. Can we discuss this issue on the mailing list? 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.
[jira] Commented: (TOMAHAWK-1291) t:graphicImage doesnot generate XHTML complaint code
[ https://issues.apache.org/jira/browse/TOMAHAWK-1291?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12608823#action_12608823 ] Hazem Saleh commented on TOMAHAWK-1291: --- alt attribute is missing. 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.