Page MenuHomePhorge

a11y: Set project workboard button tooltips as aria-label
AcceptedPublic

Authored by aklapper on Sun, Jun 1, 11:37.

Details

Summary

Dropdown elements should have associated labels per https://www.w3.org/WAI/tutorials/forms/labels/
Setting the JS tooltips for the "Manage" and "Fullscreen" dropdowns also as their aria-label is clearly more accessible than exposing no hints at all.

Regarding the implemention,

  • $action->getName() would return null as no name is set to be rendered in the UI next to the icon.
  • introducing $action->getTooltip() in PHUIListItemView would also return null as this tooltip is created via JavaScript in PhabricatorProjectBoardViewController via PHUIListItemView()->setMetadata(). Thus do the ugly dance by parsing that very metadata for the sake of more accessibility on project workboards.

Ref T16072

Test Plan

Go to a project workboard, inspect the HTML of the two buttons in the upper right corner for "Manage" and "Fullscreen", see an aria-label in the HTML code, have happier screenreader users who appreciate links which have a discernible name.

Diff Detail

Repository
rP Phorge
Branch
a11y-T16072-07 (branched from master)
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 2040
Build 2040: arc lint + arc unit