This is the way. We need more of this. I'm at a point where if a recruiter messages me "about an exciting opportunity" without any salary information, he/she will not get a response. While there are some jobs that maybe I would consider a pay cut for, I generally want to make more money because that allows me to invest more so I can be free one day.
I get ~4 recruiter emails a day and I don't think I have ever seen the salary in the initial job description. If the job looks interesting I will just reply asking what the salary is. Usually they immediately call me rather than respond via email which is pretty annoying.
I'm not sure if this even works for devs as there is so many opportunities.