The government's plan to require judges in England and Wales to warn juries against rape myths in sexual offence trials is a change worth welcoming. Ministers say the aim is to signal that assumptions about how victims should behave should never be used against them in court. Those assumptions include delays in reporting, freezing or appearing to comply with an attacker, or speaking to the perpetrator after the crime. Putting the judiciary's existing guidance on a statutory footing means that a victim's experience of justice should no longer depend on which courtroom they happen to enter.

The case that prompted much of the debate, the trial of Russell Brand, shows why this matters. Brand is serving a 10-and-a-half-year sentence after he was convicted of one count of rape and three sexual assaults. During the trial, his barrister, Ian Winter KC, told the jury that none of the complainants had "resisted or screamed or even tried to leave". That kind of argument rests on exactly the misconceptions a clear judicial direction is meant to counter. Whatever one thinks of the verdicts, it is reasonable to ask why such a point should have to be made in court without a standard warning first.

The reaction has been broadly positive. Claire Waxman, the victims' commissioner for England and Wales, said she was delighted the government had listened and called it a "significant win". Alison Levitt, the former justice minister, withdrew her own Lords amendment after seeing the government's proposal, saying it achieved "the overwhelming majority of what many of us have been seeking". Justice minister Gerard Lemos said judges would have to give directions on rape myths in all sexual offence cases unless they were convinced it was unnecessary, including cases in a domestic abuse context. Those are encouraging signs of cross-party and expert agreement.

There is, however, a gap between a law and a courtroom. The bill's wording allows judges to decide a direction is unnecessary, and the government has not yet explained how it will check that this discretion is not used inconsistently. Parliament should press for transparent reporting on how often directions are given and omitted, so that the change can be judged by its effect rather than its headline. Training for judges and advocates, and clear guidance on what a direction should contain, would also help make the reform real.

Prime Minister Andy Burnham said he never wants a victim of rape or sexual assault to feel they are the one on trial. That is the right test. If this amendment is passed, the government should measure its success by whether complainants feel heard and fairly treated, and should be ready to strengthen the law if they do not.