label attribute vs label element

Hello,

Because next XSLTForms release will be mapping XForms controls into HTML 
custom elements (xforms:* becoming XFORMS-*, @* becoming @xf-*), I am 
now perplex about XForms 2.0 @label.

It sounds like element text content (except for SCRIPT) is always to be 
rendered while attributes content should not (except for @alt, @title, 
... which are conditionally rendered but not necessarily inline). In 
XForms 2.0, @label is to be inline rendered for bound controls. CSS 
styling is basically for elements with possible attribute selectors but 
limited and tricky for attributes 
(https://stackoverflow.com/questions/2011142/how-to-change-the-style-of-the-title-attribute-inside-an-anchor-tag). 
For right-to-left languages support, an attribute has no relative 
position while a sub-element has. As a consequence, XSLTForms will 
always  generate an XFORMS-LABEL sub-element even when an @xf-label is 
present.

My conclusion is that XForms 2.0 @label might not be such a good idea.

What do you think?

Thanks!

--Alain

Received on Sunday, 12 January 2020 11:02:40 UTC