Dominant dimension and idempotent ideals