Saying "Compatible with Dungeons and Dragons" might be a trademark violation. That's unclear.
There is such a thing as fair use and nominal use. For instance, you can use the "phrase" of a trademark when making product comparisons, and courts have started defending the "nominal" use of a trademark if it's part of your past. For instance, an ex-playboy centerfold was able to describe herself as that as long as she didn't try to use the bunny ears or official logo--you can use the name (again, not the official logo) of a band in an unauthorized biography, and former members of bands have been able to at least describe themselves as "formerly of <band name>".
However, it gets less clear with advertising, or product labeling, since saying you are compatible with implies endorsement. Your selling an unlicesenced product that purports compatibility without authorization--ESPECIALLY when they have an existing licensing policy in play. So that can lead to a lawsuit.
When Gary Gygax released a couple of books about Role-Playing in general in the late 1980s, they described him as creator of D&D or Advanced Dungeons and Dragons, and if I remember correctly they clearly said on the back cover "D&D is a registered trademark of TSR--the use of this trademark has not be authorized by TSR". (If he had done in in recent years he could have been protected by nominal use precedent).
The safest way to describe compatibility is not refer to the trademark at all but say "compatible with the most popular Fantasy RPG". For instance, there are meals compatible with Nutri-System or Jenny Craig, and they say "worth 3 points", but do NOT define which system they are compatible with.
The trickier (and not 100% legally protected) is to use the trademark in plain text, indicate it's status (tm or R), indicate who it's registered to, and even say your product is not endorsed or authorized. But I think they could still take legal action. The safest thing is not to mention the Trademark at all.