No idioms, there are different meanings of the word "жаль/жалко".
Here is an article from Multilex:

жаль предик. безл.
1. (кого-л.) переводится личн. формами: pity (smb.), be / feel* sorry (for smb.)
ему жаль его — he pities him, he is / feels sorry for him
ему до слёз жаль её — the sight of her brings the tears to his eyes
2. (+ инф.):
мне жаль смотреть на него — it grieves me to look at him
3. (чего-л.) переводится глаголом: grudge (smth.)
ему жаль куска хлеба — he grudges a bit of bread
мне жаль тратить время — I grudge spending all that time
для вас ему ничего не жаль — there is nothing he would not part with to please you
4. (что, если; прискорбно) is is a pity (that, if)
ему жаль, что — he is sorry that
как жаль! — what a pity!
очень жаль — it's a great pity
Meaning 1 (normally for animate) requires accusative.
Meaning 3 (normally for inanimate) requires either genitive (usually) or accusative.