mediawiki-extensions-Visual.../modules/ve-mw/ui/widgets/ve.ui.MWTransclusionOutlineWikitextWidget.js
WMDE-Fisch dab5b5daae Add ARIA descriptions to sidebar widgets
When changing the source in the described-by attributes the screen
reader will read the text of the new source when the status changes.

Just changing the text within the elements holding the descriptions
does not work.

Bug: T291284
Change-Id: I31cc3061cf6c1f699babe41e99e0711f0eb03646
2021-10-29 12:07:53 +02:00

21 lines
753 B
JavaScript

/**
* @class
* @extends ve.ui.MWTransclusionOutlinePartWidget
*
* @constructor
* @param {ve.dm.MWTransclusionContentModel} content
*/
ve.ui.MWTransclusionOutlineWikitextWidget = function VeUiMWTransclusionOutlineWikitextWidget( content ) {
// Parent constructor
ve.ui.MWTransclusionOutlineWikitextWidget.super.call( this, content, {
icon: 'wikiText',
label: ve.msg( 'visualeditor-dialog-transclusion-wikitext' ),
ariaDescriptionSelected: ve.msg( 'visualeditor-dialog-transclusion-wikitext-widget-aria-selected' ),
ariaDescriptionUnselected: ve.msg( 'visualeditor-dialog-transclusion-wikitext-widget-aria' )
} );
};
/* Inheritance */
OO.inheritClass( ve.ui.MWTransclusionOutlineWikitextWidget, ve.ui.MWTransclusionOutlinePartWidget );