Retirement tax questions

The responses I've seen appear to be outdated (2019) by saying a retiree or nonworking spouse can't contribute to an IRA.  What I've read recently is that a spouse with no earned income CAN contribute to an IRA as long as they file jointly and one spouse has earned income.