Alan Johnson, the health secretary, yesterday promised to abolish mixed-sex accommodation in NHS hospitals throughout England within the next 12 months.

Speaking at the annual conference of the Royal College of Nursing, Johnson was given a standing ovation as he set out a timetable for honouring a longstanding commitment to stop the sexes having to share toilets, bathrooms and sleeping accommodation. The reaction was in stark contrast to two years ago, when Patricia Hewitt, his predecessor, was jeered in the same hall and forced to leave the stage before completing her speech.

The government's chief nursing officer acknowledged last year that 20% of NHS trusts were still failing to segregate the sexes. Johnson's pledge appeared to break a convention that ministers do not make big policy announcements during a "purdah" period before local authority and mayoral elections.

The health secretary said Labour used the wrong wording in its 2001 manifesto, which promised to get rid of "mixed-sex wards". The party meant to say it would eradicate mixed-sex accommodation. There was nothing wrong in having a large ward with separate bays for men and women as long as privacy could always be preserved.

He said: "I hope that by next year's [RCN] conference you would have seen us meet what is now becoming a rather frayed-at-the-edges manifesto commitment."

Johnson later told journalists that the government was "within touching distance" of abolishing mixed-sex accommodation.

Peter Carter, the RCN general secretary, said: "A few weeks ago Lord Darzi [the health minister] said in the House of Lords that this cannot be achieved, you would have to rebuild the NHS. We have gone from that to a clear commitment that over the course of next year, we should get final eradication of what the man on the street would call a mixed-sex facility."

Help the Aged said Johnson's commitment did not go far enough. Charlotte Potter, the senior policy officer, said: "We believe the government should work towards providing single-sex wards for all ... It can't keep hiding behind the idea that they set the wrong target. They need to set the right measure and stick to it."

The shadow health secretary, Andrew Lansley, said: "No amount of spin from Johnson can get round the fact that Labour have broken promise after promise on mixed-sex wards. They clearly said they would eliminate them and they've abjectly failed."