Proposed new laws to improve the experience of children involved in family courts have been published by the Scottish government.
The Children Bill follows a consultation which took into account the views of young people.
Ministers say they want to ensure the justice system does not contribute to young people's distress.
Campaigners said the legislation was "vital" for child victims of domestic abuse.
The proposals are intended to update the 1995 Children Act, to reflect changes within modern families.
A child-friendly questionnaire was used as part of the consultation process, to get the experiences and views of children who had been through the system.
The new proposals include allowing special measures such as screens and live video links to be used in Child Welfare Hearings, and to regulate child contact centres.
The Scottish government said it wanted to make sure that during a time of family breakdown, children's views were heard by the court.
Community Safety Minister Ash Denham, said: "We know that family breakdown can be very upsetting for children. It is our responsibility to ensure the family justice system is supportive and does not contribute to their distress.
"That means putting the best interests of the child first in every case and ensuring their voice is heard, including younger children."
Under the new legislation, child welfare reporters, who may be appointed when the court has been asked to resolve a dispute between parents, would be regulated.
This would ensure reporters are trained to understand and respond to issues such as domestic abuse and coercive control.
The Scottish government said other improvements include prohibiting a party from conducting their own case if there was a vulnerable witness.
Campaigners have welcomed the publication of the bill.
Dr Marsha Scott, chief executive of Scottish Women's Aid, said: "This piece of legislation will be vital for child victims of domestic abuse, as well as their mothers.
"We have done a lot of work in engaging with the Scottish government so far to make this bill child and women competent and we welcome the news that child contact centres and child welfare reporters will be regulated.
"However, exactly how this happens will be the meaningful part and we will work to ensure that the voices of children and young people are heard in this."
Support for children
Mary Glasgow, chief executive of Children 1st, said: "This important new legislation will put children's voices, views and safety at the centre of family law decisions."
The charity believes that courts have been trying to improve the support they give to children and there are specific measures in the bill which would help them take further strides to ensure every child's interests is at the heart of all they do.
Ms Glasgow added: "Preventing parents from representing themselves will bring an end to the trauma that children face when their own parent wants to cross-examine them in court.
"Standardising and regulating the system of child welfare reporters should mean every child gets the support they need wherever they are in Scotland."
The Families Need Fathers Scotland group welcomed measures to regulate child welfare reporters, and to take the views of the child on board.
But its national manager Ian Maxwell said the bill as it stood was "a massively wasted opportunity".
He said: "Families Need Fathers Scotland will press hard during the Scottish Parliament's consideration of the bill for equally-shared parenting to become the starting point if a court has to decide about arrangements for children after separation."