浏览代码

Add aria label for media embed toolbar.

Mateusz Samsel 6 年之前
父节点
当前提交
8b5a859b0a

+ 2 - 1
packages/ckeditor5-media-embed/lang/contexts.json

@@ -5,5 +5,6 @@
 	"Tip: Paste the URL into the content to embed faster.": "The tip displayed next to the media URL input informing about an easier way of embedding.",
 	"The URL must not be empty.": "An error message that informs about an empty value in the URL input.",
 	"This media URL is not supported.": "An error message that informs about unsupported media URL.",
-	"Insert media": "Toolbar button tooltip for the Media Embed feature."
+	"Insert media": "Toolbar button tooltip for the Media Embed feature.",
+	"Media toolbar": "The label describing an image toolbar attached to an image widget used by assistive technologies."
 }

+ 2 - 0
packages/ckeditor5-media-embed/src/mediaembedtoolbar.js

@@ -39,9 +39,11 @@ export default class MediaEmbedToolbar extends Plugin {
 	 */
 	afterInit() {
 		const editor = this.editor;
+		const t = editor.t;
 		const widgetToolbarRepository = editor.plugins.get( WidgetToolbarRepository );
 
 		widgetToolbarRepository.register( 'mediaEmbed', {
+			ariaLabel: t( 'Media toolbar' ),
 			items: editor.config.get( 'mediaEmbed.toolbar' ) || [],
 			getRelatedElement: getSelectedMediaViewWidget,
 		} );