PHILADELPHIA — Pennsylvania voters are getting a chance to choose candidates to fill openings on two state appellate courts, and voters in Philadelphia will pick a candidate to replace a district attorney awaiting trial on federal bribery charges.

The hottest contest in Tuesday’s primary election is the Philadelphia District Attorney’s race to succeed Democrat Seth Williams. The seven Democrats and lone Republican include a Pakistani-American, a Cuban-American, a black Muslim and a white civil rights lawyer.

Big fields are vying for mayor’s offices in some of Pennsylvania’s biggest cities, including in Pittsburgh and Allentown.

The only statewide contests on the primary ballot this year are for open seats on the state’s appeals courts.

Polls are open from 7 a.m. to 8 p.m.