protected void renderAccessibilityAttributes(FacesContext context, UIInput component, boolean disabled, boolean readonly)
                throws IOException {
        ResponseWriter writer = context.getResponseWriter();

        renderARIARequired(context, component);
        renderARIAInvalid(context, component);

        if (component instanceof InputHolder) {
            InputHolder inputHolder = ((InputHolder) component);
            String labelledBy = inputHolder.getLabelledBy();
            if (LangUtils.isNotBlank(labelledBy)) {
                writer.writeAttribute(HTML.ARIA_LABELLEDBY, labelledBy, null);
            }
        }

        if (disabled) {
            writer.writeAttribute("disabled", "disabled", null);
        }

        if (readonly) {
            writer.writeAttribute("readonly", "readonly", null);
        }
    }
Inputs of type="hidden" according to WCAG accessibility criterion 4.1.1 should not ever use
readonly or aria-readonly attributes.
<pre>
"aria-required" if the component is required
"aria-invalid" if the component is invalid
"aria-labelledby" if the component has a labelledby attribute
"disabled" and "aria-disabled" if the component is disabled
</pre>

@param context the {@link FacesContext}
@param component  the {@link UIInput} component to add attributes for
@throws IOException if any error occurs writing the response
primefaces/src/main/java/org/primefaces/renderkit/InputRenderer.java