diff --git a/lang/contexts.json b/lang/contexts.json index 9f2e5a5..43492d6 100644 --- a/lang/contexts.json +++ b/lang/contexts.json @@ -6,5 +6,6 @@ "Red pen": "Toolbar button tooltip for applying red pen (text color).", "Green pen": "Toolbar button tooltip for applying green pen (text color).", "Remove highlight": "Toolbar button tooltip for removing text highlight.", - "Highlight": "Toolbar button tooltip for the text highlight feature." + "Highlight": "Toolbar button tooltip for the text highlight feature.", + "Text highlight toolbar": "Label used by assistive technologies describing the highlight feature toolbar." } diff --git a/src/highlightui.js b/src/highlightui.js index 8b32f91..fdd17db 100644 --- a/src/highlightui.js +++ b/src/highlightui.js @@ -223,6 +223,8 @@ export default class HighlightUI extends Plugin { addToolbarToDropdown( dropdownView, buttons ); bindToolbarIconStyleToActiveColor( dropdownView ); + dropdownView.toolbarView.ariaLabel = t( 'Text highlight toolbar' ); + // Execute current action from dropdown's split button action button. splitButtonView.on( 'execute', () => { editor.execute( 'highlight', { value: splitButtonView.commandValue } ); diff --git a/tests/highlightui.js b/tests/highlightui.js index 4dc3a22..5c933e4 100644 --- a/tests/highlightui.js +++ b/tests/highlightui.js @@ -83,6 +83,12 @@ describe( 'HighlightUI', () => { expect( button ).to.have.property( 'isToggleable', true ); } ); + it( 'toolbar nas the basic properties', () => { + const toolbarView = dropdown.toolbarView; + + expect( toolbarView ).to.have.property( 'ariaLabel', 'Text highlight toolbar' ); + } ); + it( 'should have proper icons in dropdown', () => { const toolbar = dropdown.toolbarView;