8
0
Просмотр исходного кода

Add aria label for image toolbar.

Mateusz Samsel 6 лет назад
Родитель
Сommit
7e8c321f36

+ 2 - 1
packages/ckeditor5-image/lang/contexts.json

@@ -9,5 +9,6 @@
 	"Text alternative": "Label for the image text alternative input.",
 	"Enter image caption": "Placeholder text for image caption displayed when caption is empty.",
 	"Insert image": "Label for the insert image toolbar button.",
-	"Upload failed": "Title of the notification displayed when upload fails."
+	"Upload failed": "Title of the notification displayed when upload fails.",
+	"Image toolbar": "The label describing an image toolbar attached to an image widget used by assistive technologies."
 }

+ 2 - 0
packages/ckeditor5-image/src/imagetoolbar.js

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