While it’s not possible to tell what exactly is wrong with your niece’s foot without examining it, it does sound like it may be a case of anterior ankle impingement. This is, simply, what you said – something, in this case soft tissues in the ankle, have been caught in the ankle joint and cause pain whenever she moves her toes upwards, reducing the angle of the ankle.
Treatment for ankle impingement may involved rest and bracing, or it may involve surgery.