As we grow older, however, there comes a time when security in the bathroom is not as important as privacy. A closed door (or even one mostly closed) signals to others in the home that the bathroom is occupied and for others not to enter. It does not need to be securely locked to convey this message.
For this reason, pocket doors are a great design choice for bathrooms - hall baths, powder rooms, or master baths. Pocket doors are desirable for two reasons - as long as there is sufficient wall space to install them (there needs to be a space equal to the door opening to store the door when it is not closed) and there are not electrical or plumbing lines in the wall space where the doors are going to be installed.
The first reason is that pocket doors do not interfere with or occupy any floor space when they are opened or closed. A typical door that is hinged on one side or the other will either open into the bathroom and consume some of that floor space while doing so, or it will open out into the hallway or bedroom and take up passageway space there.
The second reason pocket doors are a good choice for use in bathrooms is that the doors can be adjusted from fully opened to fully closed or left somewhere in between. They don't need to be completely closed for the person using the bathroom to feel that they have closed off the space and created the privacy they need.
For older adults - and for very young children also - having doors such as traditional hinged ones that close against a stop (swinging into to the space or out) that can be locked to deter anyone else from entering the bathroom and disturbing their privacy may not be the safest idea anyway.
This is another reason for using pocket doors - or sliding doors across the opening such barn doors (mounted on the wall over either side of the opening). Pocket doors do have locking mechanisms that work with nimble hands. For arthritic hands or weaker eyesight to see the locks well, these locks may not be that easy to use. That's actually fine.
Having someone go into the bathroom and lock the door to give them a sense of security may prove hazardous if they faint, have a seizure, fall, injure themselves, or become confused while in the bathroom and cannot figure out where they are or get to the doorway - even if they could then unlock and open the door.
With a locked doorway - and someone on the inside not able to get to the door or open it - anyone on the outside of the door is going to have a challenge also. Some bathroom locks can be opened from the outside in an emergency, and some are going to be trickier to access. In either case, it's going to take time to get the door open. If the person on the inside has fallen near or against the door so that the door is partially blocked from being opened, this creates an additional safety concern.
This is another time when pocket or sliding doors are extremely helpful because they open sideways are are not hampered by someone lying against the door or near where it would otherwise open. It may be time to rethink the ability to lock the bathroom door when creating aging-in-place solutions. Safety overcomes security when it comes to bathroom doors. Privacy is still achieved.