Connectedness modulo an ideal