Page MenuHomePhabricator

Improve accessibility of collapsible languages list on Wikimedia portals
Closed, ResolvedPublic

Description

Description

The collapsible list of languages on Wikimedia portals has a few issues

Screenshot 2023-12-11 at 10.49.16 AM.png (1×1 px, 281 KB)

  • The 'articles' text inside each ".bookshelf" element is being read out to screen readers even when the list is collapsed

Screenshot 2023-12-11 at 10.48.11 AM.png (850×2 px, 387 KB)

  • The toggle button ".js-lang-list-button" should have semantics describing it is collapsing button, and the state of the collapsed list. i.e. disclosure pattern
  • ".bookshelf-container" elements should not use h2 elements.

Developer notes

This could be an opportunity to consider using the <details> element

Event Timeline

Change 983261 had a related patch set uploaded (by Bernard Wang; author: Bernard Wang):

[wikimedia/portals@master] Fix accessibility of collapsible languages list

https://gerrit.wikimedia.org/r/983261

Change 983261 merged by jenkins-bot:

[wikimedia/portals@master] Fix accessibility of collapsible languages list

https://gerrit.wikimedia.org/r/983261