TV comedies have become a battlefield in today’s culture war, often less for their on-air jokes than the personal politics and opinions of producers and stars.

The comeback season of “Roseanne” caused some contention with an episode involving the sitcom family’s Muslim neighbors and references to other ABC shows featuring Asian- and African-American families. But it was a racist comment tweeted by star Roseanne Barr that triggered ABC’s lightning-strike cancellation of the series Tuesday.

...