Getty

Wendy Williams is being ordered to sit down for a deposition in a lawsuit her guardian filed against A&E over a Lifetime documentary.

According to legal docs, obtained by TMZ, a judge ordered an early deposition of Wendy ... and the judge said Wendy's dementia diagnosis doesn't make her legally unfit to testify, and it will be up to a jury to decide how to weigh her testimony. Gallery Launch Gallery Getty

The judge said the deposition will be held remotely in a setting comfortable for Wendy ... and the A&E lawyers can only grill her for 3 hours max. The judge said the deposition may be held over no more than 3 days, with reasonable breaks being accommodated for Wendy.

The depo is for a lawsuit we first reported ... Wendy's guardian, Sabrina Morrissey , sued A&E last

See Full Page