The problem of wrongful conviction is attracting more attention in Albany, and while there is still no comprehensive approach to dealing with this critical issue, New York Attorney General Eric Schneiderman has proposed welcome legislation to deal with its aftermath.

When New Yorkers are exonerated of crimes for which they have been wrongly convicted and sentenced, there is no way for some of them to seek compensation for what can be decades behind bars. Schneiderman’s bill, the Unjust Imprisonment Act, would ensure that all wrongfully convicted people have the opportunity to seek compensation. As it stands, some people – often those most in need – are excluded from that possibility.

Most New Yorkers, we suspect, have no quarrel with providing generous compensation to unfortunate people who, in New York’s name, have been convicted of terrible crimes they did not commit. This is not about people whose convictions are dismissed because of a legal technicality, but people who are actually innocent of the crimes for which they have been torn from their families and forced into prison.

As the law stands, the opportunity to seek compensation is denied to people who confessed or pleaded guilty to crimes, even though they have been proved innocent. Yet, strange as it sounds, the false confession is the second-most common reason for wrongful conviction, according to the Innocence Project, which uses DNA testing to exonerate wrongfully convicted prisoners.

The reasons for false confession are complex, but include mentally ill or drug-addicted suspects who confess out of confusion or desperation and youths who incriminate themselves for the same reason. Those same people may also plead guilty to crimes they did not commit, reasoning that they will serve less time than if they are convicted at trial.

This happens, and often enough to be troubling. The best-known case in New York is that of the Central Park Five, teenagers who were convicted of brutally attacking and assaulting a jogger in New York City’s Central Park nearly 25 years ago.

They were innocent but under pressure from police, signed confessions believing that if they did, they would be released to their parents. Instead, they were charged, convicted and imprisoned for between six and 13 years.

Eventually, someone else confessed to the crime and his DNA was a match. More than two decades later, the state and city are dragging their feet about compensating these men for lost years.

Some are luckier, if you can call it that. Neither Anthony Capozzi nor Lynn DeJac Peters, both of Buffalo, confessed to the crimes of which they were wrongfully convicted and imprisoned. Thus, both won compensation, though the state was shameful in its treatment of DeJac Peters.

This is a law that should be enacted, but it’s hardly enough, since it deals only with the aftermath of some wrongful convictions. The state still needs to deal, as others have, with the defects that help to bring it about. Last year, Gov. Andrew M. Cuomo proposed reforms that the Assembly passed but that went nowhere in the Senate.

Those measures need to be addressed again, including those that would change lineup procedures to guard against witness misidentification – the leading cause of wrongful conviction, according to the Innocence Project – and recorded interrogations, which can help to ward off false confessions.

It is important to deal fairly with those whom the criminal justice system has already mangled, but it is even more important to prevent those miscarriages from occurring in the first place. It would be good to see Schneiderman get strongly behind those efforts, as well.