جَاءَتْ امْرَأَةٌ صَالِحٌ أَبُوهَا — A woman whose father is righteous came.
امْرَأَةٌ: nominative feminine subject.
صَالِحٌ: nominative masculine relational adjective; its quality belongs to the father.
أَبُوهَا: subject of the active-participle adjective (nominative by wāw), with -hā referring to the woman.
This teaching example illustrates why the relational adjective need not match the woman in gender.