BOSTON — A proposed Massachusetts ballot question that would require presidential candidates to release their tax returns from the prior six years to secure a spot on the state primary ballot cleared a key hurdle Wednesday.

Democratic Attorney General Maura Healey certified the question, saying it passes constitutional muster. That clears the question to go before voters next year, provided that supporters can collect the tens of thousands of signatures needed to get on the ballot.

The proposal is a reaction to Republican President Donald Trump’s refusal to publicly release his tax returns during the 2016 election. It would impose the same requirements for candidates for vice president.

There is a similar bill before Massachusetts lawmakers that would force candidates for president to turn over a certified copy of their federal income tax returns for the three most recent years to get on the primary ballot.

Both the ballot question and the proposed legislation would also require the state secretary to release the returns publicly.

Candidates who refuse to comply with the requirement would be barred from the primary ballot.

Not everyone is convinced efforts to require the disclosure of tax returns are constitutional. Critics note that the U.S. Constitution already sets out qualifications to become president. They say it’s not up to states to add new ones.

Specifically, Article Two of the Constitution establishes three requirements to win the White House: The president must be a “natural born citizen,” at least 35 years old and a resident within the United States for 14 years.

Democratic state Secretary William Galvin supports requiring the release of tax returns. He said while the U.S. Constitution lists qualifications for presidential candidates, states are allowed to determine rules for ballot access.

He noted that candidates for the legislature and other state offices in Massachusetts must file a statement of financial interest including disclosing sources of income, business interests, mortgages, real estate holdings and stock interests.

“I don’t think there’s any doubt that the states have the right to proscribe conditions for access to the ballot. We do that all the time,” Galvin said at a public hearing Wednesday, noting that the state also requires candidates for Congress to collect a certain number of signatures to get on the ballot.

“Adding this additional qualification of disclosure is just one more question of access to the ballot,” he said.

Other states have pursued similar action to force the release of tax returns for candidates for the White House.

Democratic lawmakers in New Jersey passed a bill earlier this year that would have required presidential and vice presidential candidates to release their income tax returns to get on the ballot. The bill would have prohibited electors from voting for candidates if they didn’t release the returns. Republican Gov. Chris Christie, a Trump supporter, vetoed the bill in May calling it unconstitutional.

The Democratically controlled House and Senate in Hawaii were the first to approve separate tax return proposals earlier this year. Both bills died before becoming law after the attorney general raised concerns about potential lawsuits.