In the past several years, states have made many attempts to restrict patients from getting abortions after a certain number of weeks — oftentimes before a woman even knows she's pregnant.
In December 2016, the Ohio state legislature passed a "heartbeat bill" that would have banned abortions after six weeks, or when a fetal heartbeat can be detected, even though many women don't know they're pregnant until after that point. Gov. John Kasich vetoed the bill and signed a 20-week ban into law on the same day.
Other states have tried to ban dilation & evacuation (D&E), the method commonly used to perform abortions after 14 weeks. The surgical procedure is usually used in late-term miscarriages and abortions to remove the fetal tissue as safely as possible. They account for less than 0.5% of all abortions.
Prohibiting D&E abortions is effectively a ban on all second-trimester abortions, landing such bans in murky legal territory.
In Roe v. Wade, the Supreme Court didn't specify when abortions were legal, deciding at the time to vaguely make it unconstitutional to outlaw them up until the fetus was "viable," since the science hadn't (and still hasn't) determined at the time when that was, medically speaking.
Texas and Alabama's D&E bans have reached federal appeals courts, and the Supreme Court could hear them in the upcoming term.
Sources: Business Insider, Politico