A proposed law that would require carmakers to build alarms for back seats is being pushed by child advocates who say it will prevent kids from dying in hot cars.

The law also would streamline the criminal process against caregivers who cause the deaths — cases that can be inconsistent but often heavier-handed against mothers.

Deaths came in Arizona on triple-digit degree days over a July weekend, with two baby boys found forgotten in vehicles in separate incidents.

More than two dozen child and road safety groups are backing the U.S. Senate bill introduced recently aimed at preventing those kinds of deaths by requiring cars to be equipped with technology that can alert drivers if a child is left in the back seat once the vehicle is turned off. It could be a motion sensor that can detect a baby left sitting in a rear-facing car seat and then alert the driver, in a similar way that reminders about tire pressure, open doors and seat belts now come standard in cars.

“The technology would help because if you’re in a vehicle, your child is in the back seat, and you ignore that alarm: Go to jail. Do not pass go. You had a chance,” said Janette Fennell of the advocacy group Kids and Cars.org. “You talk to any of the judges, they’ll tell you, they’re beyond the hardest things they have to deal with.”

“A simple sensor could save the lives of dozens of children killed tragically in overheated cars each year, and our bill would ensure such technology is available in every car sold in the United States,” bill sponsor Sen. Richard Blumenthal, a Democrat from Connecticut, said in a statement. “It can take mere minutes on a hot day for a car to turn into a deathtrap for a small child.”

No charges have been filed against the caregivers in either Arizona case, as police say the death investigations are underway. Detectives will determine criminality based on the caregiver’s neglect, intent and mindset, while also being sensitive to the family’s deeply felt loss of a child, Phoenix police Sgt. Mercedes Fortune said.

“Those are the very difficult questions. Each case is different. I can’t tell you there’s a set answer for any case because there really isn’t,” Fortune said.

Kids and Cars, which has tracked more than 800 children who have died in this way since 1990, said criminal cases vary greatly, even when the circumstances are identical. Fennell said 90 percent of cases involve pure accidents, most likely a child forgotten by an adult.

The nonprofit’s analysis shows charges are filed about half of the time, though very rarely are the parents found guilty objectively because it was proven that the child was left behind to be harmed. There is also a noted gender bias: Mothers are more often charged than fathers, and among the convicted, women caregivers receive longer prison sentences than men, the study found.

“It’s also a defense mechanism. If I make monsters out of these people, then it could never happen to me,” Fennell said.