Both of them, it says, were righteous in the sight of God. Both righteous in the sight of God: and what about the passage that says: 'No living person can be counteded righteous in your sight?' Perhaps in the sight of human beings one may be thought to be righteous, since human beings, aware as they are of sins of the body, are equally unaware of vices of the mind. But in God's sight, before whom the secrets of the heart are laid bare, by whom hidden thoughts do not go unnoticed, who is judged innocent and righteous?
Is there a human being who does not sin in his heart, who does not have a bad thought, who is not guilty of harboring doubts, who does not incur blame through fear? Moses doubts, Aaron goes astray, Peter denies; so who is righteous? And were they both righteous in the sight of God? In the sight of God, yes, but by means of God. Both righteous in the sight of God, not by their effort but by grace.
Listen to the Apostle: They are justified gratuitously through the grace of Christ. And again: Not from ourselves; it is God's gift. Not from our works, lest anyone boast. Yet again: What do you have that you have not received? And if you have received it, why do you boast as if you did not receive it? Therefore this is more or less what the evangelist is saying: not that they did not have it, but that they received it; not that it was earned, but that it was bestowed. - St. Peter Chyrsologus, Sermon 91 par. 3 (On Luke 1:6)