public inbox for [email protected]
help / color / mirror / Atom feedFrom: Pradip Parkale <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: [PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters.
Date: Fri, 3 Apr 2020 21:15:22 +0530
Message-ID: <CAJ9T6SvSJZ3cd11ADk2c=rAsY27ouQfhJPMadj40Dwp=YiOb-Q@mail.gmail.com> (raw)
Hi Hackers,
Please find an attached patch for key navigation in Table >> Parameter. I
have added a key down event to handle the key navigation.
--
Thanks & Regards,
Pradip Parkale
QMG, EnterpriseDB Corporation
Attachments:
[application/octet-stream] RM5275.patch (2.5K, 3-RM5275.patch)
download | inline diff:
diff --git a/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js b/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
index 23d02ca83..613941637 100644
--- a/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
+++ b/web/pgadmin/browser/server_groups/servers/databases/schemas/static/js/schema.js
@@ -55,6 +55,23 @@ define('pgadmin.node.schema', [
}
}
},
+ events : {
+ 'keydown': 'keyDownHandler',
+ },
+
+ keyDownHandler : function(event){
+ // move the focus to editable input
+ let lastButton = $(this.$el).find('button:last');
+ let firstEditableCell = $(this.$el).find('td.editable:first');
+ if (event.keyCode== 9 && !event.shiftKey){
+ if ($(firstEditableCell).is(':visible')
+ && ($(event.target)).is($(lastButton))){
+ $(firstEditableCell).trigger('click');
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ },
render: function() {
var self = this,
@@ -179,7 +196,6 @@ define('pgadmin.node.schema', [
control: Backform.SwitchControl.extend({
onChange: function() {
Backform.SwitchControl.prototype.onChange.apply(this, arguments);
-
let m = this.model;
// If value of autovacuum_enabled is false and reloptions is null
// then we should set the value of autovacuum_custom to false, as
diff --git a/web/pgadmin/browser/static/js/node.js b/web/pgadmin/browser/static/js/node.js
index 029a29817..d14dcc5bb 100644
--- a/web/pgadmin/browser/static/js/node.js
+++ b/web/pgadmin/browser/static/js/node.js
@@ -1537,6 +1537,17 @@ define('pgadmin.browser.node', [
view.$el.closest('.wcFloating').find('[tabindex]:not([tabindex="-1"]').first().focus();
return false;
}
+ let btnGroup = $(panel.$container.find('.pg-prop-btn-group'));
+ let el = $(btnGroup).find('button:first');
+ if (panel.$container.find('td.editable:last').is(':visible')){
+ if (event.keyCode === 9 && event.shiftKey) {
+ if ($(el).is($(event.target))){
+ $(panel.$container.find('td.editable:last').trigger('click'));
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ }
+ }
});
setTimeout(function() {
view thread (2+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected]
Subject: Re: [PgAdmin][RM5275] Accessibilty :Tab navigation is not working for table>> parameters.
In-Reply-To: <CAJ9T6SvSJZ3cd11ADk2c=rAsY27ouQfhJPMadj40Dwp=YiOb-Q@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox