illegality vs infraction

illegality

noun
  • a defense to the validity of a contract because it was in violation of the law 

  • the state of being illegal 

infraction

noun
  • A violation; breach. 

  • A minor offence, petty crime. 

  • A major violation of rules which leads to a penalty, if detected by the referee. 

How often have the words illegality and infraction occurred in a corpus of books? (source: Google Ngram Viewer )