A child's wishes must be considered and given due weight by the court, per CA family code, session 3042, if the child is of sufficient age and forms intelligent preference as to custody. There is no specific age requirement. A ten years old may be viewed the same as a five years old based on his intelligence and ability to reason.
A child's wish is only one of the six factors the court will consider in awarding custody. California courts most likely to award joint custody, in beliefs that it is beneficial for the child if both parents are around.