I would like to suggest that the Webmap built by ArcGIS Web Appbuilder should allow users to toggle on/off legend items under a folder by clicking the folder while pressing another key such as Shift.
From my own experience, I think this will be very handy when the legend has multiple levels.
> if the folder is currently "not selected", clicking the folder in conjunction with Shift (or other key) to toggle on itself and all sub items including folders and layers
> if the folder is currently "selected", clicking the folder in conjunction with Shift (or other key) to toggle off itself and all sub items including folders and layers