Using :focus-within allows you to change the styles for any child contained within the parent when it’s focused on.

div:focus-within > label {
    color: red;
}

Replace “div” with the parent you are trying to target.