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

Leonardo Uribe commented on MYFACES-3926:
-----------------------------------------

I checked the issue and the spec says the following about disabled property:

"... If the "disabled" attribute is specified, do not render the HTML "a" 
anchor element or the "href" element. Instead, render a "span" element. If the 
"styleClass" attribute is specified, render its value as the value of the 
"class" attribute on the "span". Render any pass-through attributes on the 
"span". ..."

The problem is what does it means with passthrough attributes. I think the 
following attributes are not passthrough attributes, so when disabled property 
is enabled for h:outputLink, h:commandLink and h:link they should not be 
rendered: charset, coords, hreflang, rel, rev, shape, target, type.

These attributes are specific for <a> tag, and are just meaningless for <span>, 
so it doesn't make any sense to render them when disabled is enabled.

This is a trivial change but at this point it is worth to apply it. 

> Disabled h:outputLink renders invalid attributes
> ------------------------------------------------
>
>                 Key: MYFACES-3926
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3926
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.2.4
>            Reporter: Sven Linstaedt
>            Priority: Trivial
>
> A disabled <h:outputLink/> component renders it's content in a <span/> tag. 
> Unfortunately the renderer does not check, if attributes that does apply to 
> <a/> will also apply to to the <span/> tag. So in addition to common 
> attributes like styleClass other ones are rendered, that are not valid in the 
> context of a <span/> like:
> * target
> * tabindex
> * shape
> * rel
> * rev
> * hreflang
> * coords
> * charset
> * ...maybe others, but I am no export for the html spec



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to