Skip to content

Commit

Permalink
MDL-73383 atto_collapse: Do not announce the list of added buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies committed Feb 17, 2022
1 parent d24a4ab commit 3094b2c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 11 deletions.
7 changes: 4 additions & 3 deletions lib/editor/atto/plugins/collapse/lang/en/atto_collapse.php
Expand Up @@ -23,9 +23,10 @@
*/

$string['pluginname'] = 'Show/hide advanced buttons';
$string['showmore'] = 'Show more buttons';
$string['showfewer'] = 'Show fewer buttons';
$string['privacy:metadata'] = 'The atto_collapse plugin does not store any personal data.';
$string['settings'] = 'Collapse toolbar settings';
$string['showfewer'] = 'Show fewer buttons';
$string['showgroups'] = 'Show first (n) groups when collapsed.';
$string['showgroups_desc'] = 'When the toolbar is collapsed (it is by default) only this many groups will be displayed at once.';
$string['privacy:metadata'] = 'The atto_collapse plugin does not store any personal data.';
$string['showmore'] = 'Show more buttons';
$string['youareonsecondrow'] = 'You are now on another row of the editor\'s toolbar, where there are more buttons.';
2 changes: 1 addition & 1 deletion lib/editor/atto/plugins/collapse/lib.php
Expand Up @@ -30,7 +30,7 @@
function atto_collapse_strings_for_js() {
global $PAGE;

$PAGE->requires->strings_for_js(array('showmore', 'showfewer'), 'atto_collapse');
$PAGE->requires->strings_for_js(array('showmore', 'showfewer', 'youareonsecondrow'), 'atto_collapse');
}

/**
Expand Down
Expand Up @@ -65,8 +65,10 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.
this.get('host').on('pluginsloaded', function(e, button) {
// Add 2 rows in the toolbar.
var toolbarRows = [
Y.Node.create('<div class="atto_toolbar_row"></div>'),
Y.Node.create('<div class="atto_toolbar_row" tabindex="-1"></div>'),
Y.Node.create('<div class="atto_toolbar_row" role="group"></div>'),
Y.Node.create('<div class="atto_toolbar_row" role="group" aria-label="' +
M.util.get_string('youareonsecondrow', PLUGINNAME) +
'" tabindex="-1"></div>'),
];
this.toolbar.appendChild(toolbarRows[0]).insert(toolbarRows[1], 'after');

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -61,8 +61,10 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.
this.get('host').on('pluginsloaded', function(e, button) {
// Add 2 rows in the toolbar.
var toolbarRows = [
Y.Node.create('<div class="atto_toolbar_row"></div>'),
Y.Node.create('<div class="atto_toolbar_row" tabindex="-1"></div>'),
Y.Node.create('<div class="atto_toolbar_row" role="group"></div>'),
Y.Node.create('<div class="atto_toolbar_row" role="group" aria-label="' +
M.util.get_string('youareonsecondrow', PLUGINNAME) +
'" tabindex="-1"></div>'),
];
this.toolbar.appendChild(toolbarRows[0]).insert(toolbarRows[1], 'after');

Expand Down
6 changes: 4 additions & 2 deletions lib/editor/atto/plugins/collapse/yui/src/button/js/button.js
Expand Up @@ -63,8 +63,10 @@ Y.namespace('M.atto_collapse').Button = Y.Base.create('button', Y.M.editor_atto.
this.get('host').on('pluginsloaded', function(e, button) {
// Add 2 rows in the toolbar.
var toolbarRows = [
Y.Node.create('<div class="atto_toolbar_row"></div>'),
Y.Node.create('<div class="atto_toolbar_row" tabindex="-1"></div>'),
Y.Node.create('<div class="atto_toolbar_row" role="group"></div>'),
Y.Node.create('<div class="atto_toolbar_row" role="group" aria-label="' +
M.util.get_string('youareonsecondrow', PLUGINNAME) +
'" tabindex="-1"></div>'),
];
this.toolbar.appendChild(toolbarRows[0]).insert(toolbarRows[1], 'after');

Expand Down

0 comments on commit 3094b2c

Please sign in to comment.