Background
Currently we use visibility: hidden to hide dropdown contents when the dropdown is closed, which also hides the dropdown contents to screen reader users. However, dropdowns generally aren't as important to screenreader users, and in the case of the Table of Contents, introduces extra steps and discoverability issues (T328480). Instead, we could use the visually hidden mixin to ensure that all dropdowns are accessible to screenreaders regardless of if the dropdown is open or not. In the case of the ToC, this would mean that users can continue to use headings to navigate to the ToC even when it is collapsed, by passing the dropdown toggle.
One concern is that this would essentially make the menu button do nothing to a screenreader users perspective, which could be unexpected.
AC
- Dropdowns are accessible to screenreaders even when closed