protected void renderARIARequired(FacesContext context, UIInput component) throws IOException {
        if (component.isRequired()) {
            ResponseWriter writer = context.getResponseWriter();
            writer.writeAttribute(HTML.ARIA_REQUIRED, "true", null);
        }
    }
Adds "aria-required" if the component is required.

@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