WASHINGTON (AP) — Federal judges would have to publicly disclose more about their finances under a bill approved by the Senate this week, which aims to make the judiciary subject to similar transparency requirements as lawmakers.

The bipartisan bill by Sens. John Cornyn, R-Texas, and Chris Coons, D-Del., is intended to make it easier for the public to find out if a judge’s financial holdings could pose a conflict of interest in a case they are presiding over.

The measure was approved by a voice vote Thursday and now goes to the House for consideration.

The effort comes as judges have faced increased scrutiny for failing to recuse themselves from matters in which they could have an interest, like stock ownership in a company that is part of a case before them.

Federal judges are required to file annual disclosures. But those documents are not readily available to the public without filing a written request. Even then, the judge must first be notified. It can take months — and potentially far longer — to obtain the filings.

The financial disclosures of lawmakers and congressional candidates, on the other hand, are posted online. And under a 2012 law known as the Stock Act, lawmakers must also file reports within 45 days after selling holdings like company stock, which judges don’t have to do.

“Federal judges should never have been excluded from the Stock Act’s disclosure requirements, and this oversight has resulted in conflicts of interest that erode public trust in our judiciary,” said Cornyn.

The legislation could come into play as Congress debates new financial ethics rules for lawmakers, including a ban on owning stocks.

Public anger over congressional trading has mounted since the first tremors of the pandemic, when some lawmakers were caught buying and selling millions of dollars worth of stock after being warned about the coming disruption from the virus. A number of the trades were probed by the Justice Department, though no lawmakers have been charged.

A handful of bills have been introduced to limit lawmakers’ ability to hold stock. But some powerful figures in Congress have said they would prefer a more targeted approach, like increased penalties, than an outright ban.

House Speaker Nancy Pelosi has said that any legislative push should also address judges.

“The judiciary has no reporting of stock transactions and it makes important decisions everyday,” Pelosi told reporters this month, referring to the periodic reports lawmakers must make when they buy or sell stocks, which comes on top of their required annual financial disclosures. “We have to do this to deter something that we see as a problem. It is a confidence issue.”

Cornyn and Coons’ bill would require the federal court system to create a searchable online database of judges’ financial disclosures, posted within 90 days of being filed. Judges would also be subjected to the Stock Act’s requirement of filing periodic transaction reports within 45 days of securities transactions over $1,000. It would still allow judges to request redactions of personal information on financial disclosure reports due to a security concern.

Under current rules, federal judges are prohibited from hearing cases that involve a party in which they or their immediate family have a financial interest. But an investigation by the Wall Street Journal last year found that between 2010 and 2018, over 130 federal judges did not recuse themselves in hundreds of cases in which they or their family had a financial interest.

Coons said the bill, if signed into law, would make sure “our legal system is free from conflicts of interest so that everyone can have clarity and confidence when they enter a courtroom.”