This is a chair in the pre-op ward of a local hospital. There’s a tray on the side, and it’s stowed away now. It has a nice low-tech safety feature: text.
The label on the tray says, “NOT FULLY ENGAGED”.
To use the tray, you’d lift it up and slide it in. When the label is hidden, the tray is safely installed. If it’s not “engaged” fully (not inserted all the way), the label shows.
I don’t know how well it works in practice, and I can only assume that there was a problem with trays collapsing. It seems like a good simple solution, though.