Weak connectedness modulo an ideal