Is it "ironic" is someone proclaims to be the opposite or what they are? [closed]

Solution 1:

Some forms of irony depend on the presence of a third party (an audience) who knows the truth of the matter. In this case the audience believes that group A is humourless and that B is amusing but sees A accusing B of humourlessness. This is ironic in the same way that divisive politicians blame their opponents for the divides that they themselves have created.

First, irony depends on a double-layered or two-story phenomenon for success. “At the lower level is the situation either as it appears to the victim of irony (where there is a victim) or as it is deceptively presented by the ironist.”[9] The upper level is the situation as it appears to the reader or the ironist. Second, the ironist exploits a contradiction, incongruity, or incompatibility between the two levels. Third, irony plays upon the innocence of a character or victim. “Either a victim is confidently unaware of the very possibility of there being an upper level or point of view that invalidates his own, or an ironist pretends not to be aware of it

Wikipedia

This is an extract from a long and illuminating Wikipedia discussion of irony. It seems to apply to your example well. It also applies to your second example. I doubt that there is any better word to describe our perception of these matters.