We need to provide actual text labels, hidden except for screenreader software, for buttons which only have icons/indicators. In other words, we should force always having a label and sometimes just not display it.
We generally use a 'title' for these now (although it is not enforced), this proposes using actual label (not title text).
Current widgets insufficient to screenreaders in order of magnitude:
- ButtonWidgets (icon only, indicator only, icon and indicator – everything except label)
- Adding label: 'label', invisibleLabel: true, to the widget's config allows for this from v0.29.3 on. See below.
- PopupButtonWidgets as special case with ButtonElement parent featuring aria-haspopup with .oo-ui-element-hidden class on child div. In FieldLayout JS we're currently, as of v0.26.5, not setting a title or a label. In PHP we gonna add the popup content to the title attribute. – Fixed for the time being, in the normal use case. We might want to go deeper when fixing general ButtonWidget icon/indicator only issue.
- NumberInputWidget buttons – https://gerrit.wikimedia.org/r/431635