Add accessibility labels to all type: 'list' toolbar groups

Bug: T245776
Change-Id: I67d8e239f4fed7dd7ac4b98be3362426e753076b
This commit is contained in:
Bartosz Dziewoński 2020-03-13 22:03:50 +01:00
parent a65c905287
commit 7b47575a45
5 changed files with 18 additions and 1 deletions

View file

@ -81,6 +81,8 @@ ve.init.mw.CollabTarget.static.actionGroups = [
icon: 'menu', icon: 'menu',
indicator: null, indicator: null,
title: ve.msg( 'visualeditor-pagemenu-tooltip' ), title: ve.msg( 'visualeditor-pagemenu-tooltip' ),
label: ve.msg( 'visualeditor-pagemenu-tooltip' ),
invisibleLabel: true,
include: [ 'changeDirectionality', 'findAndReplace' ] include: [ 'changeDirectionality', 'findAndReplace' ]
}, },
{ {

View file

@ -46,6 +46,8 @@ ve.init.mw.MobileCollabTarget.static.toolbarGroups = [
type: 'list', type: 'list',
icon: 'textStyle', icon: 'textStyle',
title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ), title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
label: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
invisibleLabel: true,
include: [ { group: 'textStyle' }, 'language', 'clear' ], include: [ { group: 'textStyle' }, 'language', 'clear' ],
forceExpand: [ 'bold', 'italic', 'clear' ], forceExpand: [ 'bold', 'italic', 'clear' ],
promote: [ 'bold', 'italic' ], promote: [ 'bold', 'italic' ],
@ -68,9 +70,10 @@ ve.init.mw.MobileCollabTarget.static.toolbarGroups = [
name: 'insert', name: 'insert',
header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), header: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ),
title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ), title: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ),
label: OO.ui.deferMsg( 'visualeditor-toolbar-insert' ),
invisibleLabel: true,
type: 'list', type: 'list',
icon: 'add', icon: 'add',
label: '',
include: '*', include: '*',
exclude: [ 'comment', 'indent', 'outdent', { group: 'format' } ] exclude: [ 'comment', 'indent', 'outdent', { group: 'format' } ]
}, },

View file

@ -98,6 +98,8 @@ ve.init.mw.DesktopArticleTarget.static.actionGroups = [
icon: 'menu', icon: 'menu',
indicator: null, indicator: null,
title: ve.msg( 'visualeditor-pagemenu-tooltip' ), title: ve.msg( 'visualeditor-pagemenu-tooltip' ),
label: ve.msg( 'visualeditor-pagemenu-tooltip' ),
invisibleLabel: true,
include: [ 'meta', 'categories', 'settings', 'advancedSettings', 'languages', 'templatesUsed', 'changeDirectionality', 'findAndReplace' ] include: [ 'meta', 'categories', 'settings', 'advancedSettings', 'languages', 'templatesUsed', 'changeDirectionality', 'findAndReplace' ]
}, },
{ {
@ -105,6 +107,8 @@ ve.init.mw.DesktopArticleTarget.static.actionGroups = [
type: 'list', type: 'list',
icon: 'edit', icon: 'edit',
title: ve.msg( 'visualeditor-mweditmode-tooltip' ), title: ve.msg( 'visualeditor-mweditmode-tooltip' ),
label: ve.msg( 'visualeditor-mweditmode-tooltip' ),
invisibleLabel: true,
include: [ 'editModeVisual', 'editModeSource' ] include: [ 'editModeVisual', 'editModeSource' ]
}, },
{ {

View file

@ -54,6 +54,8 @@ ve.init.mw.MobileArticleTarget.static.toolbarGroups = [
type: 'list', type: 'list',
icon: 'textStyle', icon: 'textStyle',
title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ), title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
label: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
invisibleLabel: true,
include: [ { group: 'textStyle' }, 'language', 'clear' ], include: [ { group: 'textStyle' }, 'language', 'clear' ],
forceExpand: [ 'bold', 'italic', 'clear' ], forceExpand: [ 'bold', 'italic', 'clear' ],
promote: [ 'bold', 'italic' ], promote: [ 'bold', 'italic' ],
@ -463,6 +465,8 @@ ve.init.mw.MobileArticleTarget.prototype.setupToolbar = function ( surface ) {
type: 'list', type: 'list',
icon: 'edit', icon: 'edit',
title: OO.ui.deferMsg( 'visualeditor-mweditmode-tooltip' ), title: OO.ui.deferMsg( 'visualeditor-mweditmode-tooltip' ),
label: OO.ui.deferMsg( 'visualeditor-mweditmode-tooltip' ),
invisibleLabel: true,
include: [ 'editModeVisual', 'editModeSource' ] include: [ 'editModeVisual', 'editModeSource' ]
}, },
{ {

View file

@ -61,6 +61,8 @@ ve.init.mw.Target.static.toolbarGroups = [
type: 'list', type: 'list',
icon: 'textStyle', icon: 'textStyle',
title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ), title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
label: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
invisibleLabel: true,
include: [ { group: 'textStyle' }, 'language', 'clear' ], include: [ { group: 'textStyle' }, 'language', 'clear' ],
forceExpand: [ 'bold', 'italic', 'clear' ], forceExpand: [ 'bold', 'italic', 'clear' ],
promote: [ 'bold', 'italic' ], promote: [ 'bold', 'italic' ],
@ -79,6 +81,8 @@ ve.init.mw.Target.static.toolbarGroups = [
type: 'list', type: 'list',
icon: 'listBullet', icon: 'listBullet',
title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ), title: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ),
label: OO.ui.deferMsg( 'visualeditor-toolbar-structure' ),
invisibleLabel: true,
include: [ { group: 'structure' } ], include: [ { group: 'structure' } ],
demote: [ 'outdent', 'indent' ] demote: [ 'outdent', 'indent' ]
}, },