McGrath: "So for a church to encourage its members to see slavery or the death penalty or racism as things that should be opposed would be to overstep the mark?"
No. Religious organizations and their leaders (including priests, rabbis, imams, etc.) can preach whatever beliefs they want, on issues. They can actively protest war, slavery, abortion, homosexuality, fornication, women working outside the home, or even [shudder] dancing. No violation of the separation of church and state there; no attempt to give the state control over the church or vice versa. But when they start telling people which candidates they may or may not vote for, that does cross the line.
If the church holds that abortion is a mortal sin and if Candidate X proposes that abortion be kept legal, an individual Catholic might vote for Candidate X and then, believing that the vote was a sin, "confess" it to a priest. After that, with the "sin" forgiven, communion should be offered just as it would have been if he had not so "sinned." But if another Catholic, even one who agrees that all abortions should be banned, chooses to vote for Candidate X -- for any number of reasons -- and does not see that as a sin, he has no reason to "confess" it to the priest. And the priest has no business asking how the parishioners voted (or at least no business expecting an answer).