<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:formvh="http://typo3.org/ns/TYPO3/CMS/Form/ViewHelpers" data-namespace-typo3-fluid="true">
<formvh:renderRenderable renderable="{element}">
    <f:form.validationResults for="{element.rootForm.identifier}.{element.identifier}">
        <f:if condition="{element.properties.elementDescription}">
            <f:variable name="aria" value="{describedby: '{element.uniqueIdentifier}-desc'}" />
        </f:if>
        <f:if condition="{validationResults.errors}">
            <f:variable name="aria" value="{invalid: 'true', describedby: '{element.uniqueIdentifier}-errors'}" />
        </f:if>
        <f:variable name="errorClass">{f:if(condition: '{validationResults.errors}', then: ' {element.rootForm.renderingOptions.fieldProperties.errorClassAttribute}')}</f:variable>

        <f:render partial="Field/Field" arguments="{element: element, doNotShowLabel: 1}" contentAs="elementContent">
            <label class="{element.properties.labelClassAttribute}{errorClass}" for="{element.uniqueIdentifier}">
                <f:form.checkbox
                    property="{element.identifier}"
                    id="{element.uniqueIdentifier}"
                    class="{element.properties.elementClassAttribute}"
                    value="{element.properties.value}"
                    errorClass="{element.rootForm.renderingOptions.fieldProperties.errorClassAttribute}"
                    additionalAttributes="{formvh:translateElementProperty(element: element, property: 'fluidAdditionalAttributes')}"
                    aria="{aria}"
                />
                <span class="{element.properties.labelTextClassAttribute}">{formvh:translateElementProperty(element: element, property: 'label')}<f:if condition="{element.required}"><f:render partial="Field/Required" arguments="{element: element}"/></f:if></span>
            </label>
        </f:render>
    </f:form.validationResults>
</formvh:renderRenderable>
</html>
