A survey of disabled people, used to inform the highly anticipated National Disability Strategy, has been ruled "unlawful" by the High Court.
The UK Disability Survey gained 14,000 responses but was found to have failed to consult with people effectively.
The case was brought by four disabled people, who said they were "very pleased" with the outcome.
The government said it was "disappointed" and would "consider its next steps carefully".
The UK Disability Survey, launched in January 2021, invited the views of disabled people on their everyday experiences.
It comprised 109 multiple-choice and four open-ended questions such as: "What are the top-three changes that would make your life better?"
And the responses were used to inform the strategy, published in July to mixed reviews.
But Jean Eveleigh, Victoria Hon, Doug Paulley and Miriam Binder, who has since died, argued while the Work and Pensions Secretary Therese Coffey had consulted with disabled people, she had failed to provide sufficient information on the proposed strategy to allow for meaningful responses.
The government, meanwhile, argued the survey had been an information-gathering exercise, not a consultation.
But Mr Justice Griffiths ruled although the government did not have a legal duty to have a consultation, once Ms Coffey had promised an "open consultation", she had a duty of care to see this through.
"The defendant took on a duty to consult, which she did not properly discharge and, as a result, the consultation she carried out, principally by means of the survey, was not lawful," he said.
Ms Eveleigh said: "Now that the court has given this clear declaration, I hope the secretary of state will carry out a proper and considered consultation to inform a revision of the Strategy."
Ms Hon said: "For too long, disabled individuals have been infantilised and our views ignored.
"This judgement sends a clear message that the government cannot claim to consult with disabled people if in practice we are not given the proper opportunity to share our views."
The government said it would seek permission to appeal against the ruling, at the Court of Appeal.
"We remain committed to improving the everyday lives of disabled people," it added, "and the National Disability Strategy has already made significant inroads."