More general text element matching which doesn't break for links