def confirmable_div(confirm_field_id: str | None, prefix: str = 'form-group-') -> str:
    """Return an opening div tag linking this error div to a confirm field.

    See `confirmable-error.ts`.
    """
    attrs = ['', 'data-role="confirmable-error"',
             f'data-confirmed-by-checkbox-id="{confirm_field_id}"'] \
        if confirm_field_id else []

    return f"<div{' '.join(attrs)}>"