All of that should frankly be handled case-by-case, and whether or not to disclose to parents should boil down to exactly one thing: does the child want their parents involved? Because in my experience, when a kid doesn’t feel safe enough to tell their parents about things like self-harming and suicidal thoughts, they have VERY good reasons for it. And those reasons are invariably some flavor of “my parents are abusive and there is no way this can end well.”
If the kid specifically requests of their counselor/teacher “for the love of everything DO NOT tell my parents” then no, you don’t deserve to know. Because your child does not trust you.
Personal experience time: I’ve had self-harming tendencies and suicidal thoughts since I was 8 years old. My mother, up until very very recently, believed psychiatric care was a scam and that people who were depressed were just being weak and selfish. I never told her anything, because little 8-year-old me could see exactly how many awful ways that might end.
If the school knows of the child’s mental health issues and declined to inform the parents because the child requested they not do so, then no, the school is not liable if something happens. If they told the parents anyway even after the child begged them not to, and something happens? You bet your ass the school should be held responsible.