Background
Approach taken in T307900 adds a <label> element used as a button for the checkbox hack. This <label> currently doesn't have any text or an aria-label.
Accessibility report - "This element has role of "button" but does not have a name available to an accessibility API."
It should have text i.e. "Toggle the table of contents"
Developer notes
Considering the implementation of the collapsible TOC is still subject to change, and that there will likely be other small a11y errors in the future, my recommendation is to do this task later on.
QA steps
- Navigate to a page on beta cluster with a TOC
- Using VoiceOver or a screen reader, tab to the TOC collapsible icon (visible below desktop viewport 1000px)
- Note that Toggle the table of contents is read and close captioned
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ❌ | T310810#8122218 |
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T310810#8122222 |