The Senate is moving closer to passing legislation that would require states to grant public-safety employees, including police, firefighters and emergency medical workers, the right to collectively bargain over hours and wages.

The bill, known as the Public Safety Employer-Employee Cooperation Act, would mainly affect about 20 states that don't grant collective-bargaining rights statewide for public-safety workers or that prohibit such bargaining. State and municipal associations, as well as business groups, oppose it,...