Fix broken accordion widget,

Also clean-up the code some while visiting this file.
Add displayed property.
and remove logs, commments, etc...
Make test name match actually file name
Added a test
Merge pull request #5404 from jdfreder/accordion

Fix broken accordion widget