Under Illinois law, there is a preference for a natural parent to have custody over a minor child, versus another relative. When two parties divorce, if one party is awarded custody and something were to happen to that custodial parent (i.e. death, etc.) that would warrant them no longer fit for custody of the minor child, the other parent would retain custody of the minor child by default. In some instances a custodial parent may be able to make known their wishes for guardianship of their minor child, but there is always a rebuttable presumption that the other parent would retain custody.
There are a few sections of the Illinois Marriage and Dissolution of Marriage Act that do provide a method for a non-parent family member to petition for custody of a minor child, however, those situations are rare. In the event that a step-parent wishes to file for custody of the minor child, and the minor child is in the custody or possession of their surviving parent, the step-parent can do so if they can prove numerous factors, one of which being that the minor child resided with them for the past five (5) years. In the event that a non-parent has possession of a minor child, or, the minor child is in the possession of a non-parent, others are able to file a petition for custody of the minor child under a similar rule.
Generally speaking, however, a custodial parent does not have the right to name an absolute successor in the event of their untimely demise, to take over as custodial parent. Generally speaking, the surviving parent would retain custody of the minor child in those situations.