The description for the druid's Wild Shape feature says, in part:
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.
How do I tell if I can retain a feature? What criteria are used to determine if a racial feature would still be available in a Wild Shape form?
Best Answer
The physical form will be your limiting condition
The Players Handbook, Page 67 states (emphasis mine):
Racial Traits that are tied to physical form requirements would not transfer to WildShape. An example of this is the Aarakocra Trait of Flight(because wings). If you Wildshape into a beast that can't fly or doesn't have wings, then your Racial Trait wouldn't transfer over.
A trait like Elf Fey Ancestry for advantage on savings throws against being Charmed and immunity to magical sleep would be something that would cross over to your Wild Shape as it has no specific physical origin.
If you are unsure or want to verify, talk about it with your DM or player. The 'physical' guideline has enough gray areas that the less obvious traits may need a table ruling.
Crawford agrees in an unofficial tweet: