Consider a druid that has the Elven Accuracy racial feat (available to Elves and Half-Elves). Among other things, this feat says:
Whenever you have advantage on an attack roll using Dexterity, Intelligence, Wisdom, or Charisma, you can reroll one of the dice once. (XGtE, pg. 74)
As discussed here, when in Wild Shape:
You retain the benefit of any features from your class, race, or other source and can use them if the new form is physically capable of doing so. (PHB, pg. 67)
Because of this, Elven Accuracy should apply to any attacks made while in Wild Shape.
However, beasts’ stat blocks don’t explicitly say which ability is being used in an attack. For example, the Wolf’s bite attack simply says it’s +4 to hit and does 2d4+2 piercing damage.
Now, it may be possible to deduce which ability was used. In the case of the Wolf, from a +2 damage bonus, we can guess that that relevant ability score modifier is equal to that bonus (+2). This would be consistent with +4 to hit if the wolf has a proficiency bonus of +2 (since +2+2=+4), which it does (according to its stat block). As a mundane attack, the Wolf must have used Strength or Dexterity, but the Wolf’s Strength is only +1 while its Dexterity is +2. Therefore the Wolf used Dexterity.
In contrast, a similar line of reasoning with the Dire Wolf leads to the conclusion that it uses Strength to power its bite attack.
So a druid in Wolf shape should be able to apply Elven Accuracy, but a druid in Dire Wolf shape should not.
Is this the correct way to determine a druid’s eligibility to use Elven Accuracy’s reroll while in Wild Shape?
It seems awfully convoluted…