mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
1) Added labels and titles after parsing and validating all the pgAdmin4 web pages for accessibility. Fixes #4770
2) Fixed an issue where Save Password control disappears after clicking on it while creating a server. Fixes #5116
This commit is contained in:
committed by
Akshay Joshi
parent
0da23b837d
commit
210bbfdbe1
@@ -71,7 +71,7 @@ define('pgadmin.node.schema', [
|
||||
|
||||
var gridHeader = _.template([
|
||||
'<div class="subnode-header">',
|
||||
' <label class="control-label col-sm-4"><%-label%></label>',
|
||||
' <span class="control-label col-sm-4"><%-label%></span>',
|
||||
'</div>'].join('\n')),
|
||||
gridBody = $('<div class="pgadmin-control-group backgrid form-group col-12 object subnode"></div>').append(
|
||||
gridHeader(attributes)
|
||||
|
||||
@@ -89,7 +89,7 @@ define('pgadmin.node.role', [
|
||||
template: _.template([
|
||||
'<label class="<%=Backform.controlLabelClassName%>"><%=label%></label>',
|
||||
'<div class="<%=Backform.controlsClassName%>">',
|
||||
' <select multiple="multiple" style="width:100%;" class="pgadmin-controls <%=extraClasses.join(\' \')%>" name="<%=name%>" value="<%-JSON.stringify(value)%>" <%=disabled ? "disabled" : ""%> <%=required ? "required" : ""%>>',
|
||||
' <select title = <%=label%> multiple="multiple" style="width:100%;" class="pgadmin-controls <%=extraClasses.join(\' \')%>" name="<%=name%>" value="<%-JSON.stringify(value)%>" <%=disabled ? "disabled" : ""%> <%=required ? "required" : ""%>>',
|
||||
' <% for (var i=0; i < options.length; i++) { %>',
|
||||
' <% var option = options[i]; %>',
|
||||
' <option value=<%-option.value%> data-icon=<%-option.image%> <%=value != null && _.indexOf(value, option.value) != -1 ? "selected" : ""%> <%=option.disabled ? "disabled=\'disabled\'" : ""%>><%-option.label%></option>',
|
||||
|
||||
@@ -337,8 +337,8 @@ function(gettext, _, $, Backbone, Backform, Backgrid, Alertify, pgAdmin, pgNode)
|
||||
var self = this,
|
||||
titleTmpl = _.template([
|
||||
'<div class=\'subnode-header\'>',
|
||||
'<label class=\'control-label\'><%-label%></label>',
|
||||
'<button class=\'btn btn-sm-sq btn-secondary add fa fa-plus\' title=\'' + _('Add new row') + '\' <%=canAdd ? \'\' : \'disabled="disabled"\'%>></button>',
|
||||
'<span class=\'control-label\'><%-label%></span>',
|
||||
'<button class=\'btn btn-sm-sq btn-secondary add fa fa-plus\' title=\'' + _('Add new row') + '\' <%=canAdd ? \'\' : \'disabled="disabled"\'%>><span class="sr-only">Add new row</span></button>',
|
||||
'</div>'].join('\n')),
|
||||
$gridBody =
|
||||
$('<div class=\'pgadmin-control-group backgrid form-group col-12 object subnode\'></div>').append(
|
||||
|
||||
@@ -226,7 +226,7 @@ define('pgadmin.browser', [
|
||||
width: 500,
|
||||
isCloseable: false,
|
||||
isPrivate: true,
|
||||
content: '<div class="sql_textarea"><textarea id="sql-textarea" name="sql-textarea" title="'+gettext('SQL Code')+'"></textarea></div>',
|
||||
content: '<label for="sql-textarea" class="sr-only">SQL Code</label><div class="sql_textarea"><textarea id="sql-textarea" name="sql-textarea" title="'+gettext('SQL Code')+'"></textarea></div>',
|
||||
}),
|
||||
// Dependencies of the object
|
||||
'dependencies': new pgAdmin.Browser.Panel({
|
||||
|
||||
@@ -99,7 +99,7 @@ define([
|
||||
'<button tabindex="0" type="<%= type %>" ',
|
||||
'class="btn <%=extraClasses.join(\' \')%>"',
|
||||
'<% if (disabled) { %> disabled="disabled"<% } %> title="<%-tooltip%>">',
|
||||
'<span class="<%= icon %>" role="img"></span><% if (label != "") { %> <%-label%><% } %></button>',
|
||||
'<span class="<%= icon %>" role="img"></span><% if (label != "") { %> <%-label%><% } %><span class="sr-only"><%-tooltip%></span></button>',
|
||||
].join(' '));
|
||||
if (location == 'header') {
|
||||
btnGroup.appendTo(that.header);
|
||||
@@ -165,9 +165,9 @@ define([
|
||||
|
||||
// canDrop can be set to false for individual row from the server side to disable the checkbox
|
||||
if ('canDrop' in model && model.canDrop === false)
|
||||
this.$el.empty().append('<input tabindex="-1" type="checkbox" disabled="disabled"/>');
|
||||
this.$el.empty().append('<input tabindex="-1" type="checkbox" title="Select" disabled="disabled"/>');
|
||||
else
|
||||
this.$el.empty().append('<input tabindex="-1" type="checkbox" />');
|
||||
this.$el.empty().append('<input tabindex="-1" type="checkbox" title="Select" />');
|
||||
|
||||
this.delegateEvents();
|
||||
return this;
|
||||
|
||||
@@ -208,7 +208,7 @@ define([
|
||||
pgAdmin.Browser.MenuGroup = function(opts, items, prev, ctx) {
|
||||
var template = _.template([
|
||||
'<% if (above) { %><li class="dropdown-divider"></li><% } %>',
|
||||
'<li class="dropdown-submenu">',
|
||||
'<li class="dropdown-submenu" role="menuitem">',
|
||||
' <a href="#" class="dropdown-item">',
|
||||
' <% if (icon) { %><i class="<%= icon %>"></i><% } %>',
|
||||
' <span><%= label %></span>',
|
||||
|
||||
Reference in New Issue
Block a user