Fixed some accessibility issues. Fixes #5732

This commit is contained in:
Pradip Parkale
2020-09-15 13:03:18 +05:30
committed by Akshay Joshi
parent 324e3e74be
commit 8e132eab08
9 changed files with 24 additions and 22 deletions

View File

@@ -589,7 +589,7 @@ define([
} else {
item_ele +=
`<div>
<input type="text" class="fm_file_rename"/>
<input aria-label="file_rename" type="text" class="fm_file_rename"/>
<div class="fm_file_name">
<div class="d-flex">
<span class="fm_file_list ${icon_type}"></span>
@@ -1260,11 +1260,11 @@ define([
select_box = `<div class='change_file_types d-flex align-items-center p-1'>
<div>` +
gettext('Show hidden files and folders?') +
`<input type='checkbox' id='show_hidden' onclick='pgAdmin.FileUtils.handleClick(this)' tabindex='0'>
`<input aria-label="Show hidden files and folders" type='checkbox' id='show_hidden' onclick='pgAdmin.FileUtils.handleClick(this)' tabindex='0'>
</div>
<div class="ml-auto">
<label class="my-auto">` + gettext('Format') + `</label>
<select name='type' tabindex='0'>${fileFormats}</select>
<select aria-label="select" name='type' tabindex='0'>${fileFormats}</select>
<div>`;
}
@@ -1542,7 +1542,7 @@ define([
// we remove simple file upload element
$('.file-input-container').remove();
$('.upload').remove();
$('.create').before('<button value="Upload" type="button" title="Upload File" name="upload" id="upload" class="btn btn-sm btn-primary-icon upload" tabindex="0"><span class="fa fa-upload sql-icon-lg"></span></button> ');
$('.create').before('<button aria-label="Upload" value="Upload" type="button" title="Upload File" name="upload" id="upload" class="btn btn-sm btn-primary-icon upload" tabindex="0"><span class="fa fa-upload sql-icon-lg"></span></button> ');
$('#uploader .upload').off().on('click', function() {
// we create prompt

View File

@@ -9,11 +9,11 @@
<div class="input-group" role="group">
<div class="input-group-prepend">
<button name="home" type="button" value="Home" title="{{ _('Home') }}" class="btn btn-primary-icon home"
tabindex="0">
tabindex="0" aria-label="home">
<span class="fa fa-home sql-icon-lg"></span>
</button>
<button name="level-up" type="button" title="{{ _('Back') }}" value="LevelUp" class="btn btn-primary-icon level-up"
disabled tabindex="0">
disabled tabindex="0" aria-label="level up">
<span class="fa fa-level-up-alt sql-icon-lg"></span>
</button>
</div>
@@ -25,31 +25,31 @@
<input class="mode" name="mode" type="hidden" value="add"/>
<input class="currentpath" name="currentpath" type="hidden"/>
<button type="button" title="{{ _('Refresh') }}" class="btn btn-sm btn-primary-icon refresh"
tabindex="0">
tabindex="0" aria-label="refresh">
<span class="fa fa-sync-alt sql-icon-lg"></span>
</button>
<button type="button" title="{{ _('Download File') }}" class="btn btn-sm btn-primary-icon download"
disabled>
disabled aria-label="Download File">
<span class="fa fa-download sql-icon-lg"></span>
</button>
<button name="delete" type="button" title="{{ _('Delete File/Folder') }}" class="btn btn-sm btn-primary-icon delete"
disabled>
disabled aria-label="delete">
<span class="fa fa-trash-alt sql-icon-lg"></span>
</button>
<button name="rename" type="button" title="{{ _('Rename File/Folder') }}" class="btn btn-sm btn-primary-icon rename"
tabindex="0">
tabindex="0" aria-label="rename">
<span class="fa fa-edit sql-icon-lg"></span>
</button>
<button name="newfolder" type="button" title="{{ _('Create new folder') }}" value="New Folder"
class="btn btn-sm btn-primary-icon create" tabindex="0">
class="btn btn-sm btn-primary-icon create" tabindex="0" aria-label="newfolder">
<span class="fa fa-folder-open sql-icon-lg"></span>
<span class="fa fa-plus add-folder-icon"></span>
</button>
<div class="btn-group" role="group">
<button class="ON btn btn-primary-icon btn-sm grid" type="button" title="{{ _('View as grid') }}" tabindex="0">
<button class="ON btn btn-primary-icon btn-sm grid" type="button" title="{{ _('View as grid') }}" tabindex="0" aria-label="View as grid">
<span class="fa fa-th sql-icon-lg"></span>
</button>
<button type="button" class="btn btn-primary-icon btn-sm list" title="{{ _('View as table') }}" tabindex="0">
<button type="button" class="btn btn-primary-icon btn-sm list" title="{{ _('View as table') }}" tabindex="0" aria-label="View as table">
<span class="fa fa-list sql-icon-lg"></span>
</button>
</div>