It doesn't make sense but its a standard to render all pass through attributes on the root Element.
All custom components are collection of HTML elements, so we can not decide to render pass through attributes on any specific element. That is why all the pass through attributes are being rendered on the root element. If any of the child element of the custom component requires to have some attribute, it usually defined on the component as a none pass trhough attribte (e.g.)
To set the "size" and the "style class" on the "input" element of the "inputFile" component, there are two attributes are defined on the "inputFile" component respectively the inputTextSize and the inputTextClass .
It doesn't make sense but its a standard to render all pass through attributes on the root Element.
All custom components are collection of HTML elements, so we can not decide to render pass through attributes on any specific element. That is why all the pass through attributes are being rendered on the root element. If any of the child element of the custom component requires to have some attribute, it usually defined on the component as a none pass trhough attribte (e.g.)
To set the "size" and the "style class" on the "input" element of the "inputFile" component, there are two attributes are defined on the "inputFile" component respectively the inputTextSize and the inputTextClass .