Rep. Anna G. Eshoo (D-Calif.) right, joins House Speaker Nancy Pelosi (D-Calif.) and Senate Minority Leader Charles E. Schumer at a news conference Wednesday. (J. Scott Applewhite/AP)

House Democrats pushed through legislation Thursday to lower prescription drug prices, strengthen the Affordable Care Act and — most significantly — position themselves as the party on the side of health-care consumers as the 2020 election approaches.

The 234-to-183 vote, with every Democrat and five Republicans casting ballots in favor, gave a partisan hue even to three strategies to boost the availability of generic drugs that initially attracted GOP support. Those were merged, however, with measures that would block several Trump administration policies that Democrats characterize as “sabotaging” the ACA.

The upshot was a barbed debate: Democrats accused Republicans of disregarding consumers’ need for affordable, quality health care, and Republicans accused Democrats of thwarting a rare opportunity for bipartisanship.

And with no plan in the Senate to consider the legislation, and no chance that President Trump would sign it if the Senate ever did, House Democrats employed Thursday’s debate to demonize Senate Majority Leader Mitch McConnell (R-Ky.), as well as the White House.

“I have some news for the distinguished leader in the Senate, the Republican leader,” said House Speaker Nancy Pelosi (D-Calif.). “The support for these bills is alive and well among the American people. He will be hearing from them because these bills are a matter of life and death and certainly quality of life for America’s working families.”

Specifically, the legislation would block new rules written last year by the Trump administration to encourage Americans to buy inexpensive health plans, originally intended for short-term use, that can cover fewer medical services and lack the ACA’s consumer protections, including those for people with preexisting medical conditions.

The legislation also would reverse steps the administration has taken to lessen attention on enrollment in the ACA’s insurance marketplaces, restoring funding for advertising and other outreach activities and for “navigators” in grass-roots groups that help people sign up for coverage.

Another aspect of the legislation would create a new pot of money to help any state that wanted to build its own ACA marketplace, rather than relying on the federal health insurance exchange — an effort aimed at a few states in which the governorship recently has switched from Republican to Democratic hands.

Celinda Lake, a veteran Democratic political strategist, said the House majority’s focus on health care reflects that “it’s the best issue for Democrats” and was the top priority among Democratic voters in 2018. “So you’ve got a ton of people [in the House] who made a commitment on that and want to be able to show when they go home that they got something done,” Lake said.

Protecting the ACA has been rising in importance, particularly among women and swing voters, Lake said, as Trump in recent months reprised his vow to repeal it — an effort for which congressional Republicans express little enthusiasm after failing two years ago — and as the Justice Department argued that the entire law is unconstitutional in a Texas lawsuit now before the U.S. Court of Appeals for the 5th Circuit.

The legislation approved by the House is more moderate than the health-care positions of many of the 23 Democrats running for president. A number of the candidates advocate some form of ­single-payer health-care system, which they lump together under the name Medicare-for-all, while the rest support other efforts to move toward universal insurance coverage.

Pelosi, though, is focused on improvements to the sprawling health-care law passed in 2010 by a Democratic Congress. Those more modest steps, Lake said, align with what polling and focus groups have shown that Democratic voters expect of lawmakers. “People don’t look for their member of Congress to redo the entire health-care system,” Lake said, “but they did elect their member of Congress to make some things better.”

Energy and Commerce Committee Chairman Frank Pallone Jr. (D-N.J.), whose panel approved the seven individual bills woven into the package, called Thursday’s vote “a big step in our commitment to deliver on our promise to make health care and prescription drugs more affordable.”

Rep. Greg Walden (Ore.), the committee’s ranking Republican, noted that the panel had unanimously approved the three measures intended to foster development of generic drugs. “House Democrats could not pass up a chance to play gotcha politics. . . . Somewhere on the path to the House floor, they jammed our bipartisan bills with partisan bills.”

Pelosi countered that the bills were combined so that savings from the drug-cost strategies would cover the cost of the steps to strengthen the ACA.

The day before the House vote, a delegation of Senate Democrats joined with their counterparts on the House side of the Capitol for a news conference to portray themselves as champions of the will of American voters and disparage Trump and McConnell as undermining people’s well-being.

“Across the country, Americans are worried about rising costs, declining quality. . . . Nothing, nothing, nothing bothers people more than that,” said Senate Minority Leader Charles E. Schumer (D-N.Y.). There has been a relentless campaign of sabotage by the Trump administration to deny people health care. . . . But the Republican-led Senate — no movement, nothing, no debate, no legislation, no votes.”

Rep. Anna G. Eshoo (D-Calif.) carried a sledgehammer to the lectern, taped with a sign saying “Trump” and “Barr,” in a reference to Attorney General William P. Barr. “On the heels of not being able to overturn the Affordable Care Act in Congress,” Eshoo said, “they’ve taken a sledgehammer to health care in our country.”