Same-sex relations are banned in more than half of Africa’s 54 nations. Some countries, including Botswana and Gabon, have moved recently to decriminalize homosexual relations, but others have stuck with penal codes inherited from former colonial powers. Researchers say the proposal in Ghana casts an unusually wide net for possible transgressions: A pro-LGBTQ tweet, for instance, could be a violation.