We research all brands listed and may earn a fee from our partners. Research and financial considerations may influence how brands are displayed. Not all brands are included. Learn more.

Giving advice
David Woolfall—Getty Images

It's one of the most dreaded interview questions. But soon, it may become a non-issue. Last week, Massachusetts became the first state to ban employers from asking about salary history in job interviews, a move equal pay advocates see as crucial to closing the gender wage gap. And now New York City may follow suit.

Public Advocate Letitia James is introducing legislation similar to Massachusetts', which requires employers to provide a salary figure to applicants based on what the applicant is worth to the company, rather than basing pay on what the potential employee previously earned. Similar laws have been proposed in New York state, California, and Colorado, according to Politico. Massachusetts is the first and currently only state to pass the ban.

The reasoning for the bill is this: If women and minorities are already underpaid—which, on average, they are compared to white men—basing future earnings on previous earnings won't help close the gender and racial wage gaps, it just exacerbates them. That's why career coaches and websites (like Money) emphasize the need to negotiate your very first salary; it sets you up for all future earnings.

Katie Donovan, who helped draft Massachusetts's law and runs Equal Pay Negotiations, said women often undersell themselves in salary negotiations, and using salary history as a "pay anchor" for a new job perpetuates low pay.

"If we’re statistically 20% underpaid, which we are, and we’re going for another job, the rule of thumb is don’t take a new job unless you’re getting 10% more," Donovan says. "But if you’re 20% underpaid, and you’re only getting 10% more, you’re still 10% underpaid."

Read Next: 6 Excuses for the Gender Pay Gap You Can Stop Using

Still, 68% of women said they accepted their first salary offer without negotiation according to a survey by Glassdoor. There are good reasons for that. Women who do negotiate the same as men are often seen as "pushy" and "assertive," and not in a complimentary way.

Federal law prohibits gender wage discrimination. Yet white women make, on average, 79 cents for every dollar a white man earns, across industries. Women still earn less than men even in the top-earning professions.

As Politico noted, James' legislation comes a few months after a report spearheaded by her office found "women who work in municipal government make, on average, 18% less than their male counterparts" in New York City, and that women of color make significantly less than white women.

Read Next: How to Talk About Salary in a Job interview

If you live in one of the other 49 states, there are still ways to deflect questions about past salaries. Donovan advises that when you're asked for salary information in an online application, to leave it blank or to input "0.00." If you work in the private sector, you can tell the potential employer that your salary information is confidential and that you can't divulge it.

"If they push, ask 'Can you really explain to me how that’s relevant? Please walk me through why that’s relevant,' " Donovan suggests. "Make them give you a good reason, and there is none. There is absolutely none."

Money also advises saying things like, “I’d actually like to talk a little more about the job responsibilities” before answering, or ask how much is budgeted for the job because you want to make sure you're in the ballpark.