[What you need to know to start the day: Get New York Today in your inbox.]

ALBANY — For decades, sexual harassment was the State Capitol’s worst-kept secret.

Even as women climbed the ranks of political power and won legal promises of gender equality, legislators avoided the topic of harassment. Female aides and even lawmakers who tried to complain were ignored or paid to be silent.

Even when harassment scandals burst into public view, lawmakers did not propose bills to strengthen workplace protections, promising instead to dedicate themselves to internal reform.

But under the newly Democrat-led Legislature, that era seems to have ended. Earlier this year, the state held its first public hearings on the issue in nearly 30 years. And on Wednesday, lawmakers passed sweeping anti-harassment legislation that supporters said would make New York’s laws among the most robust in the nation.