ANYONE with a job gives up some control of their private life. A boss can require access to a car, or a clean drug test, or that an employee not come to work smelling like an overripe boys locker room.

But employers’ reach should not extend into their employees’ private communications on social media. Senate Bill 5211, currently under consideration in the state Legislature, would set that principle as state law, prohibiting employers from requiring workers or prospective employees to turn over social-media passwords as a condition of employment. Employers who violate it could be sued.

There must be exceptions, of course. The law acknowledges that some jobs require full security clearances. And employers are free to poke around in publicly available Facebook walls or tweets or Tumblr feeds, just as they are able to check for criminal convictions.

What’s hidden behind a password-protected digital wall, however, should be no different from what’s behind the closed front door of an employee’s house. What is there should not be an employer’s problem, unless an employee makes it a problem.

Workers or job applicants have a duty to keep private what is meant to be private. But on the digital frontier of ubiquitous social media, lives are increasingly lived in the public domain. Broadcasting gripes about a boss typed on an unprotected Facebook wall, or yelled in the middle of the workplace, carry consequences.

Be smart. Respect boundaries. Don’t be a jerk.

Six states, including California and Illinois, already have laws similar to SB 5211, and dozens more are considering them. Washington should join them.