From 0a67b2ecb95df0859d6eb87b9cf9dcde24142df1 Mon Sep 17 00:00:00 2001 From: Aditya Toshniwal Date: Tue, 3 Dec 2019 12:47:42 +0530 Subject: [PATCH] =?UTF-8?q?Added=C2=A0aria-label=20to=20provide=20an=20inv?= =?UTF-8?q?isible=20label=20where=20a=20visible=20label=20cannot=20be=20us?= =?UTF-8?q?ed.=20Fixes=20#4772.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/en_US/release_notes_4_16.rst | 1 + .../servers/templates/servers/password.html | 8 +- .../templates/servers/tunnel_password.html | 8 +- web/pgadmin/browser/static/js/browser.js | 4 +- web/pgadmin/browser/static/js/menu.js | 1 + web/pgadmin/browser/static/js/node.js | 3 +- .../browser/templates/browser/index.html | 9 +- web/pgadmin/dashboard/static/js/dashboard.js | 6 +- .../dashboard/database_dashboard.html | 8 +- .../templates/dashboard/server_dashboard.html | 4 +- .../dashboard/welcome_dashboard.html | 2 +- web/pgadmin/static/js/backform.pgadmin.js | 89 +++++++++++++++---- .../js/sqleditor/query_tool_preferences.js | 65 ++++++++++---- .../static/scss/_bootstrap.overrides.scss | 18 +++- .../static/vendor/backform/backform.js | 6 +- .../static/vendor/backgrid/backgrid.js | 41 ++++++++- 16 files changed, 201 insertions(+), 72 deletions(-) diff --git a/docs/en_US/release_notes_4_16.rst b/docs/en_US/release_notes_4_16.rst index b8e3fc46e..356668f46 100644 --- a/docs/en_US/release_notes_4_16.rst +++ b/docs/en_US/release_notes_4_16.rst @@ -12,6 +12,7 @@ New features | `Issue #4396 `_ - Warn the user on changing the definition of Materialized View about the loss of data and its dependent objects. | `Issue #4435 `_ - Allow drag and drop functionality for all the nodes under the database node, excluding collection nodes. | `Issue #4711 `_ - Use a 'play' icon for the Execute Query button in the Query Tool for greater consistency with other applications. +| `Issue #4772 `_ - Added aria-label to provide an invisible label where a visible label cannot be used. | `Issue #4773 `_ - Added role="status" attribute to all the status messages for accessibility. | `Issue #4944 `_ - Allow Gunicorn logs in the container to be directed to a file specified through GUNICORN_ACCESS_LOGFILE. diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/password.html b/web/pgadmin/browser/server_groups/servers/templates/servers/password.html index 7086c383e..3bae7c1da 100644 --- a/web/pgadmin/browser/server_groups/servers/templates/servers/password.html +++ b/web/pgadmin/browser/server_groups/servers/templates/servers/password.html @@ -1,9 +1,9 @@
-
{{ _('Please enter the password for the user \'{0}\' to connect the server - "{1}"').format(username, - server_label) }}
+
- +
@@ -24,7 +24,7 @@
-
{{ errmsg }}
+
{{ errmsg }}
diff --git a/web/pgadmin/browser/server_groups/servers/templates/servers/tunnel_password.html b/web/pgadmin/browser/server_groups/servers/templates/servers/tunnel_password.html index 1ad1a1138..ed7df8664 100644 --- a/web/pgadmin/browser/server_groups/servers/templates/servers/tunnel_password.html +++ b/web/pgadmin/browser/server_groups/servers/templates/servers/tunnel_password.html @@ -2,9 +2,9 @@
{% if prompt_tunnel_password %} {% if tunnel_identity_file %} -
{{ _('SSH Tunnel password for the identity file \'{0}\' to connect the server "{1}"').format(tunnel_identity_file, tunnel_host) }}
+
{% else %} -
{{ _('SSH Tunnel password for the user \'{0}\' to connect the server "{1}"').format(tunnel_username, tunnel_host) }}
+
{% endif %}
@@ -21,7 +21,7 @@
{% endif %} {% if prompt_password %} -
{{ _('Database server password for the user \'{0}\' to connect the server "{1}"').format(username, server_label) }}
+
@@ -44,7 +44,7 @@
-
{{ errmsg }}
+
{{ errmsg }}
diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js index 205f2c122..1dc9c24e1 100644 --- a/web/pgadmin/browser/static/js/browser.js +++ b/web/pgadmin/browser/static/js/browser.js @@ -226,7 +226,7 @@ define('pgadmin.browser', [ width: 500, isCloseable: false, isPrivate: true, - content: '
', + content: '
', }), // Dependencies of the object 'dependencies': new pgAdmin.Browser.Panel({ @@ -357,7 +357,6 @@ define('pgadmin.browser', [ // enabled/disabled. _.each([ {m: 'file', id: '#mnu_file'}, - {m: 'edit', id: '#mnu_edit'}, {m: 'management', id: '#mnu_management'}, {m: 'tools', id: '#mnu_tools'}, {m: 'help', id:'#mnu_help'}], function(o) { @@ -827,7 +826,6 @@ define('pgadmin.browser', [ _.each([ {menu: 'file', id: '#mnu_file'}, - {menu: 'edit', id: '#mnu_edit'}, {menu: 'management', id: '#mnu_management'}, {menu: 'tools', id: '#mnu_tools'}, {menu: 'help', id:'#mnu_help'}], diff --git a/web/pgadmin/browser/static/js/menu.js b/web/pgadmin/browser/static/js/menu.js index de95490bc..3f3dba411 100644 --- a/web/pgadmin/browser/static/js/menu.js +++ b/web/pgadmin/browser/static/js/menu.js @@ -72,6 +72,7 @@ define([ 'href': this.url, 'target': this.target, 'data-toggle': 'pg-menu', + 'role': 'menuitem', }).data('pgMenu', { module: this.module || pgAdmin.Browser, cb: this.callback, diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js index e7e80c8d7..c3d6ac04a 100644 --- a/web/pgadmin/browser/static/js/node.js +++ b/web/pgadmin/browser/static/js/node.js @@ -1115,7 +1115,8 @@ define('pgadmin.browser.node', [ tmpl = _.template([ '', ].join(' ')); if (location == 'header') { diff --git a/web/pgadmin/browser/templates/browser/index.html b/web/pgadmin/browser/templates/browser/index.html index 76e222f5e..b2e0a8151 100644 --- a/web/pgadmin/browser/templates/browser/index.html +++ b/web/pgadmin/browser/templates/browser/index.html @@ -100,8 +100,8 @@ window.onload = function(e){