This is a terrific point, Maha. In general, participation is what we care about, and attendance is only a proxy measure for it (with a lot of false positives, in my experience).
I’ve been encouraging faculty to split “participation” grades into at least 2 pieces, so there’s a formal requirement on the faculty member to give some feedback about what good participation does or doesn’t look like in the class.
I’ve also got a colleague who’s gone all the way to having the students self-report their engagement after every class. His point is that during any given hour of class, a student may not have something to say, may get talked over, may be afraid to ask a question, may be concerned about some other issue in their life. But there are always measures of engagement which apply, like how well they did the homework, how carefully they took notes during class, whether they posted to a discussion board, etc. So he lets the students report those things as evidence of engagement with the course as well.
Obviously, this wouldn’t work for all situations – in a discussion-based seminar, or a team-based lab, or performing arts class, you have to show up and do the task, every day. But I think it’s a neat model for most course designs.