Handle `collapsed` class on triggers even when manually invoked

Fixes #13636.
perhaps we should make `accordion` an `id` instead of a `class`