AFTER THE Justice Department released a scathing account of how New York authorities mistreat juveniles in the Rikers Island jail, the message was clear: reform or get sued. Four months later, U.S. Attorney Preet Bharara, who described a lockup in which “beatings are routine while accountability is rare,” has decided to sue. The added pressure on the jail to conform to basic standards is past due. And Rikers is hardly alone in mistreating young people.

Things appear to be changing, albeit slowly, at Rikers. New York Mayor Bill de Blasio announced last week that the city would stop throwing juveniles into solitary confinement at Rikers. That at least addressed one major problem: Solitary is a mental assault, and it can be particularly harmful to still-developing teenage brains.

Yet it should not have taken so long for the city to begin changing policy, and it should not have taken the Justice Department to force reform. Congress years ago should have compelled state and local authorities across the country to end solitary for juveniles — at Rikers and in every other lockup, jail and prison. Not to mention other reforms that would limit gratuitous, counterproductive ill treatment and harm that state and local criminal justice systems do to young offenders. Federal lawmakers can still press for all of this instead of leaving it to the Justice Department.

Congress for decades has been regulating how minors are treated behind bars through the 1974 Juvenile Justice Detention and Prevention Act. The act tied federal criminal justice funding to several crucial reforms. It ended the practice of throwing convicted minors into adult prisons. It greatly curtailed the practice of locking up juveniles for status offenses (offenses adults would not be locked up for) such as truancy. It demanded that states report on racial disparities in the juvenile justice system.

But the law hasn’t had a good rewrite since 2002. That’s not for lack of need, as the Rikers situation shows. It’s also not for lack of bipartisan agreement: Republicans and Democrats favor improving the act. Sen. Charles E. Grassley (R-Iowa) and Sen. Sheldon Whitehouse (D-R.I.) announced this month that they would try to get their colleagues moving.

The pair introduced an update of the act that would insist that juveniles, even if charged as adults, can’t be put into solitary. It would further discourage the jailing of status offenders and encourage alternative punishments. It would demand that minors not be locked up with adults before or during trial — the current requirement only applies after sentencing. It would demand more information from states about how much they use solitary and potentially dangerous restraints. And it would increase reporting requirements on racial disparities in state criminal justice systems.

Mr. Grassley is on deck to become chairman of the Judiciary Committee next year. We trust that he will use his gavel to get the bill through the panel as soon as he can. Then it will be on Senate and House leaders to take up the bill, ensure it has enough funding behind it and send it to President Obama’s desk.