On Wed, Jan 17, 2018 at 12:23 PM, Khushboo Vashi <
[email protected]> wrote:
>
>
> On Mon, Jan 15, 2018 at 10:39 PM, Dave Page <[email protected]> wrote:
>
>> Hi
>>
>> On Mon, Jan 15, 2018 at 10:23 AM, Khushboo Vashi <
>> [email protected]> wrote:
>>
>>> Hi,
>>>
>>> Please find the attached patch for RM # 2904: As a visually impaired
>>> user I need all buttons in the application to have appropriate tooltips for
>>> my screen reader to interpret.
>>>
>>
>> Unfortunately I think there's been a misunderstanding with this patch,
>> most likely my fault for not being clearer;
>>
>> - There is no need to add tooltips to buttons that already have text,
>> unless we want to add additional information. For example, on the OK
>> button, we might have a tooltip that says "Apply the changes and close the
>> dialog". That really is optional though, as screen readers could already
>> read the button text (but we should be consistent).
>>
>> - We do need to add tooltips to buttons that don't have any text. For
>> example;
>> * dialogue title-bar buttons
>> * the "close tab" and "move tabs left"/"move tabs right" buttons
>> that may appear in tab bars
>> * the add row button at the top of a subnode control (e.g. to add a
>> column definition)
>> * the delete and expand row buttons in subnode grid rows
>>
>> Sorry for not being clearer about the requirements.
>>
>> Thanks for the clarification.
> Please find the attached updated patch.
>
Missed attachment. Please find it attached.
> --
>> Dave Page
>> Blog: http://pgsnake.blogspot.com
>> Twitter: @pgsnake
>>
>> EnterpriseDB UK: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>
diff --git a/web/pgadmin/browser/server_groups/servers/static/js/variable.js b/web/pgadmin/browser/server_groups/servers/static/js/variable.js
index 5dca9f5..2c5bb07 100644
--- a/web/pgadmin/browser/server_groups/servers/static/js/variable.js
+++ b/web/pgadmin/browser/server_groups/servers/static/js/variable.js
@@ -330,7 +330,7 @@ define([
titleTmpl = _.template([
'<div class=\'subnode-header\'>',
'<label class=\'control-label\'><%-label%></label>',
- '<button class=\'btn-sm btn-default add fa fa-plus\' <%=canAdd ? \'\' : \'disabled="disabled"\'%>></button>',
+ '<button class=\'btn-sm btn-default add fa fa-plus\' title=\'' + _('Add new row') + '\' <%=canAdd ? \'\' : \'disabled="disabled"\'%>></button>',
'</div>'].join('\n')),
$gridBody =
$('<div class=\'pgadmin-control-group backgrid form-group col-xs-12 object subnode\'></div>').append(
diff --git a/web/pgadmin/static/js/alertify.pgadmin.defaults.js b/web/pgadmin/static/js/alertify.pgadmin.defaults.js
index 3129ecc..d2c1591 100644
--- a/web/pgadmin/static/js/alertify.pgadmin.defaults.js
+++ b/web/pgadmin/static/js/alertify.pgadmin.defaults.js
@@ -190,6 +190,8 @@ define([
alertify.pgDialogBuild = function() {
this.set('onshow', function() {
this.elements.dialog.classList.add('pg-el-container');
+ $(this.elements.commands.close).attr('title', gettext('Close'));
+ $(this.elements.commands.maximize).attr('title', gettext('Maximize'));
alertifyDialogResized.apply(this, arguments);
});
this.set('onresize', alertifyDialogStartResizing.bind(this, true));
@@ -369,5 +371,11 @@ define([
},
});
+ // Confirm dialogue: Set title attribute
+ alertify.confirm().set({onshow:function() {
+ $(this.elements.commands.close).attr('title', gettext('Close'));
+ $(this.elements.commands.maximize).attr('title', gettext('Maximize'));
+ }});
+
return alertify;
});
diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js
index 4f3b144..6ac80d8 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -983,7 +983,7 @@ define([
gridHeader = _.template([
'<div class="subnode-header">',
' <label class="control-label pg-el-sm-10"><%-label%></label>',
- ' <button class="btn-sm btn-default add fa fa-plus" <%=canAdd ? "" : "disabled=\'disabled\'"%>><%-add_label%></button>',
+ ' <button class="btn-sm btn-default add fa fa-plus" <%=canAdd ? "" : "disabled=\'disabled\'"%> title="' + _('Add new row') + '"><%-add_label%></button>',
'</div>',
].join('\n')),
gridBody = $('<div class="pgadmin-control-group backgrid form-group pg-el-xs-12 object subnode"></div>').append(
@@ -1024,7 +1024,7 @@ define([
// Insert Edit Cell into Grid
if (data.disabled == false && data.canEdit) {
var editCell = Backgrid.Extension.ObjectCell.extend({
- schema: gridSchema.schema,
+ schema: gridSchema.schema
});
gridSchema.columns.unshift({
@@ -1246,7 +1246,7 @@ define([
var self = this,
gridHeader = ['<div class=\'subnode-header\'>',
' <label class=\'control-label pg-el-sm-10\'>' + data.label + '</label>',
- ' <button class=\'btn-sm btn-default add fa fa-plus\'></button>',
+ ' <button class=\'btn-sm btn-default add fa fa-plus\' title=\'' + _('Add new row') + '\'></button>',
'</div>',
].join('\n'),
gridBody = $('<div class=\'pgadmin-control-group backgrid form-group pg-el-xs-12 object subnode\'></div>').append(gridHeader);
diff --git a/web/pgadmin/static/js/backgrid.pgadmin.js b/web/pgadmin/static/js/backgrid.pgadmin.js
index bec22ce..eb4516a 100644
--- a/web/pgadmin/static/js/backgrid.pgadmin.js
+++ b/web/pgadmin/static/js/backgrid.pgadmin.js
@@ -330,7 +330,7 @@ define([
if (editable) {
this.$el.html(
- '<i class=\'fa fa-pencil-square subnode-edit-in-process\'></i>'
+ '<i class=\'fa fa-pencil-square subnode-edit-in-process\' title=\'' + _('Edit row') + '\'></i>'
);
this.model.trigger(
'pg-sub-node:opened', this.model, this
@@ -345,7 +345,7 @@ define([
},
render: function() {
this.$el.empty();
- this.$el.html('<i class=\'fa fa-pencil-square-o\'></i>');
+ this.$el.html('<i class=\'fa fa-pencil-square-o\' title=\'' + _('Edit row') + '\'></i>');
this.delegateEvents();
if (this.grabFocus)
this.$el.focus();
@@ -422,7 +422,7 @@ define([
},
render: function() {
this.$el.empty();
- this.$el.html('<i class=\'fa fa-trash\'></i>');
+ this.$el.html('<i class=\'fa fa-trash\' title=\'' + _('Delete row') + '\'></i>');
this.delegateEvents();
return this;
},