New York City has such a law, and New York state has a law like it up for vote soon: https://www.nysenate.gov/legislation/bills/2021/s5598
"Requires employers to disclose compensation or range of compensation to applicants and employees upon issuing an employment opportunity for internal or public viewing or upon employee request."