Skip to content

Commit

Permalink
Fix incorrect language button ariaLabel
Browse files Browse the repository at this point in the history
  • Loading branch information
Mati365 committed Mar 20, 2024
1 parent 9aa8149 commit ecb43e4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ckeditor5-language/src/textpartlanguageui.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ export default class TextPartLanguageUI extends Plugin {
return accessibleLabel;
}

return `${ accessibleLabel }, ${ selectedLanguageTitle }`;
return `${ selectedLanguageTitle }, ${ accessibleLabel }`;
} );

// Execute command when an item from the dropdown is selected.
Expand Down
4 changes: 2 additions & 2 deletions packages/ckeditor5-language/tests/textpartlanguageui.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ describe( 'TextPartLanguageUI', () => {
expect( dropdown.buttonView.ariaLabel ).to.equal( 'Language' );

command.value = 'fr:ltr';
expect( dropdown.buttonView.ariaLabel ).to.equal( 'Language, French' );
expect( dropdown.buttonView.ariaLabel ).to.equal( 'French, Language' );

command.value = 'ar:rtl';
expect( dropdown.buttonView.ariaLabel ).to.equal( 'Language, Arabic' );
expect( dropdown.buttonView.ariaLabel ).to.equal( 'Arabic, Language' );
} );

it( 'reflects the #value of the command', () => {
Expand Down

0 comments on commit ecb43e4

Please sign in to comment.