Accordion causes SEVERE error in browser console (#15182)

Refactored to remove invisible widgets from DOM.

Change-Id: I94d0ba37f4a75d71df88fbb0b1767ae60f39432d