Skip to content

Commit d760cde

Browse files
tyryluPytal
authored andcommitted
Fix accessibility of buttons in the external storage configuration
Note that there is no keyboard only way to close the dropdown Signed-off-by: Christopher Ng <chrng8@gmail.com>
1 parent 392b08d commit d760cde

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

apps/files_external/css/settings.css

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_external/css/settings.css.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

apps/files_external/css/settings.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@
5252
width: 44px;
5353
[class^='icon-'],
5454
[class*=' icon-'] {
55+
width: 44px;
56+
height: 44px;
57+
margin: 3px;
5558
opacity: 0.5;
5659
padding: 14px;
5760
vertical-align: text-bottom;

apps/files_external/js/settings.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ MountConfigListView.prototype = _.extend({
715715
});
716716

717717
this.$el.on('click', 'td.mountOptionsToggle>.icon-more', function() {
718+
$(this).attr('aria-expanded', 'true');
718719
self._showMountOptionsDropdown($(this).closest('tr'));
719720
});
720721

@@ -1343,6 +1344,7 @@ MountConfigListView.prototype = _.extend({
13431344
var mountOptions = dropDown.getOptions();
13441345
$('body').off('mouseup.mountOptionsDropdown');
13451346
$tr.find('input.mountOptions').val(JSON.stringify(mountOptions));
1347+
$tr.find('td.mountOptionsToggle>.icon-more').attr('aria-expanded', 'false');
13461348
self.saveStorageConfig($tr);
13471349
});
13481350
}

apps/files_external/templates/settings.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,11 +173,11 @@ function writeParameterInput($parameter, $options, $classes = []) {
173173
</td>
174174
<?php endif; ?>
175175
<td class="mountOptionsToggle hidden">
176-
<div class="icon-more" title="<?php p($l->t('Advanced settings')); ?>"></div>
176+
<button type="button" class="icon-more" aria-expanded="false" title="<?php p($l->t('Advanced settings')); ?>"></button>
177177
<input type="hidden" class="mountOptions" value="" />
178178
</td>
179179
<td class="save hidden">
180-
<div class="icon-checkmark" title="<?php p($l->t('Save')); ?>"></div>
180+
<button type="button" class="icon-checkmark" title="<?php p($l->t('Save')); ?>"></button>
181181
</td>
182182
</tr>
183183
</tbody>

0 commit comments

Comments
 (0)