public inbox for [email protected]help / color / mirror / Atom feed
[pgAdmin][RM5154] [Accessibility] : Alertify 9+ messages / 4 participants [nested] [flat]
* [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-02-19 11:28 Pradip Parkale <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Pradip Parkale @ 2020-02-19 11:28 UTC (permalink / raw) To: pgadmin-hackers Hi Hackers, Attached is a patch for accessibility issue related Alertifyjs. 1. Added hidden label to satisfy accessibility. 2. Added label with sr-only class. 3. Added tabindex to move the mouse control to the maximize button using the tab key. Please note that this patch also includes the fix for the RM-5143 Accessibility issue to maximize the panel for backup and restore windows and all other places. -- Thanks & Regards, Pradip Parkale QMG, EnterpriseDB Corporation ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-02-19 11:32 Ashesh Vashi <[email protected]> parent: Pradip Parkale <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Ashesh Vashi @ 2020-02-19 11:32 UTC (permalink / raw) To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers Forgot to attach the patch? On Wed, 19 Feb 2020 at 16:58, Pradip Parkale < [email protected]> wrote: > Hi Hackers, > > Attached is a patch for accessibility issue related Alertifyjs. > > 1. Added hidden label to satisfy accessibility. > 2. Added label with sr-only class. > 3. Added tabindex to move the mouse control to the maximize button > using the tab key. > > > Please note that this patch also includes the fix for the > RM-5143 Accessibility issue to maximize the panel for backup and restore > windows and all other places. > -- > Thanks & Regards, > Pradip Parkale > QMG, EnterpriseDB Corporation > -- -- Thanks & Regards, Ashesh Vashi EnterpriseDB INDIA: Enterprise PostgreSQL Company <http://www.enterprisedb.com; *http://www.linkedin.com/in/asheshvashi* <http://www.linkedin.com/in/asheshvashi; ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-02-19 11:34 Pradip Parkale <[email protected]> parent: Ashesh Vashi <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Pradip Parkale @ 2020-02-19 11:34 UTC (permalink / raw) To: Ashesh Vashi <[email protected]>; +Cc: pgadmin-hackers Please find the attached patch. On Wed, Feb 19, 2020 at 5:02 PM Ashesh Vashi <[email protected]> wrote: > Forgot to attach the patch? > > On Wed, 19 Feb 2020 at 16:58, Pradip Parkale < > [email protected]> wrote: > >> Hi Hackers, >> >> Attached is a patch for accessibility issue related Alertifyjs. >> >> 1. Added hidden label to satisfy accessibility. >> 2. Added label with sr-only class. >> 3. Added tabindex to move the mouse control to the maximize button >> using the tab key. >> >> >> Please note that this patch also includes the fix for the >> RM-5143 Accessibility issue to maximize the panel for backup and restore >> windows and all other places. >> -- >> Thanks & Regards, >> Pradip Parkale >> QMG, EnterpriseDB Corporation >> > -- > > -- > > Thanks & Regards, > > Ashesh Vashi > EnterpriseDB INDIA: Enterprise PostgreSQL Company > <http://www.enterprisedb.com; > > > *http://www.linkedin.com/in/asheshvashi* > <http://www.linkedin.com/in/asheshvashi; > -- Thanks & Regards, Pradip Parkale QMG, EnterpriseDB Corporation Attachments: [application/octet-stream] RM5154.patch (2.0K, 3-RM5154.patch) download | inline diff: diff --git a/web/package.json b/web/package.json index acfcb2efa..8416c5f22 100644 --- a/web/package.json +++ b/web/package.json @@ -51,7 +51,7 @@ }, "dependencies": { "acitree": "git+https://github.com/imsurinder90/jquery-aciTree.git#rc.7", - "alertifyjs": "1.7.1", + "alertifyjs": "git+https://github.com/pradipparkale269/AlertifyJS.git#EDB-MASTER", "axios": "^0.18.1", "babel-plugin-transform-es2015-modules-amd": "^6.24.1", "babel-preset-es2015-without-strict": "~0.0.4", diff --git a/web/pgadmin/static/js/alertify/dialog_wrapper.js b/web/pgadmin/static/js/alertify/dialog_wrapper.js index 83186e710..876dafa77 100644 --- a/web/pgadmin/static/js/alertify/dialog_wrapper.js +++ b/web/pgadmin/static/js/alertify/dialog_wrapper.js @@ -64,7 +64,7 @@ export class DialogWrapper { $(alertifyDialog.elements.footer).on('keydown', 'button', function(event) { if (event.keyCode == 9 && $(this).nextAll('button:not([disabled])').length == 0) { // set focus back to first editable input element of current active tab once we cycle through all enabled buttons. - commonUtils.findAndSetFocus($(alertifyDialog.elements.body).find('.tab-content div.active')); + $(alertifyDialog.elements.dialog).find('[tabindex]:not([tabindex="-1"]').first().focus(); return false; } }); diff --git a/web/yarn.lock b/web/yarn.lock index 26272668b..62af24928 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -910,10 +910,9 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" [email protected]: +"alertifyjs@git+https://github.com/pradipparkale269/AlertifyJS.git#EDB-MASTER": version "1.7.1" - resolved "https://registry.yarnpkg.com/alertifyjs/-/alertifyjs-1.7.1.tgz#3c7b8ac67609aea737fe8e06d7fac885ce18ba8f" - integrity sha1-PHuKxnYJrqc3/o4G1/rIhc4Yuo8= + resolved "git+https://github.com/pradipparkale269/AlertifyJS.git#215378e6cb5aabad9a855d3a5a1e4ad7111a6e5e" alphanum-sort@^1.0.0: version "1.0.2" ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-02-21 05:49 Akshay Joshi <[email protected]> parent: Pradip Parkale <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Akshay Joshi @ 2020-02-21 05:49 UTC (permalink / raw) To: Aditya Toshniwal <[email protected]>; +Cc: Ashesh Vashi <[email protected]>; pgadmin-hackers; Pradip Parkale <[email protected]> Hi Aditya Can you please review this patch. On Wed, Feb 19, 2020 at 5:04 PM Pradip Parkale < [email protected]> wrote: > Please find the attached patch. > > On Wed, Feb 19, 2020 at 5:02 PM Ashesh Vashi < > [email protected]> wrote: > >> Forgot to attach the patch? >> >> On Wed, 19 Feb 2020 at 16:58, Pradip Parkale < >> [email protected]> wrote: >> >>> Hi Hackers, >>> >>> Attached is a patch for accessibility issue related Alertifyjs. >>> >>> 1. Added hidden label to satisfy accessibility. >>> 2. Added label with sr-only class. >>> 3. Added tabindex to move the mouse control to the maximize button >>> using the tab key. >>> >>> >>> Please note that this patch also includes the fix for the >>> RM-5143 Accessibility issue to maximize the panel for backup and restore >>> windows and all other places. >>> -- >>> Thanks & Regards, >>> Pradip Parkale >>> QMG, EnterpriseDB Corporation >>> >> -- >> >> -- >> >> Thanks & Regards, >> >> Ashesh Vashi >> EnterpriseDB INDIA: Enterprise PostgreSQL Company >> <http://www.enterprisedb.com; >> >> >> *http://www.linkedin.com/in/asheshvashi* >> <http://www.linkedin.com/in/asheshvashi; >> > > > -- > Thanks & Regards, > Pradip Parkale > QMG, EnterpriseDB Corporation > -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-02-24 09:03 Aditya Toshniwal <[email protected]> parent: Akshay Joshi <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Aditya Toshniwal @ 2020-02-24 09:03 UTC (permalink / raw) To: Pradip Parkale <[email protected]>; +Cc: Ashesh Vashi <[email protected]>; pgadmin-hackers; Akshay Joshi <[email protected]> Hi Pradip, - commonUtils.findAndSetFocus($(alertifyDialog.elements.body).find('.tab-content div.active')); + $(alertifyDialog.elements.dialog).find('[tabindex]:not([tabindex="-1"]').first().focus(); Use the same common function with commonUtils.findAndSetFocus(alertifyDialog.elements.dialog)). It will handle the focus. Also, make the required changes mentioned on the pull request - https://github.com/EnterpriseDB/AlertifyJS/pull/1 On Fri, Feb 21, 2020 at 11:19 AM Akshay Joshi <[email protected]> wrote: > Hi Aditya > > Can you please review this patch. > > On Wed, Feb 19, 2020 at 5:04 PM Pradip Parkale < > [email protected]> wrote: > >> Please find the attached patch. >> >> On Wed, Feb 19, 2020 at 5:02 PM Ashesh Vashi < >> [email protected]> wrote: >> >>> Forgot to attach the patch? >>> >>> On Wed, 19 Feb 2020 at 16:58, Pradip Parkale < >>> [email protected]> wrote: >>> >>>> Hi Hackers, >>>> >>>> Attached is a patch for accessibility issue related Alertifyjs. >>>> >>>> 1. Added hidden label to satisfy accessibility. >>>> 2. Added label with sr-only class. >>>> 3. Added tabindex to move the mouse control to the maximize button >>>> using the tab key. >>>> >>>> >>>> Please note that this patch also includes the fix for the >>>> RM-5143 Accessibility issue to maximize the panel for backup and restore >>>> windows and all other places. >>>> -- >>>> Thanks & Regards, >>>> Pradip Parkale >>>> QMG, EnterpriseDB Corporation >>>> >>> -- >>> >>> -- >>> >>> Thanks & Regards, >>> >>> Ashesh Vashi >>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>> <http://www.enterprisedb.com; >>> >>> >>> *http://www.linkedin.com/in/asheshvashi* >>> <http://www.linkedin.com/in/asheshvashi; >>> >> >> >> -- >> Thanks & Regards, >> Pradip Parkale >> QMG, EnterpriseDB Corporation >> > > > -- > *Thanks & Regards* > *Akshay Joshi* > > *Sr. Software Architect* > *EnterpriseDB Software India Private Limited* > *Mobile: +91 976-788-8246* > -- Thanks and Regards, Aditya Toshniwal pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune "Don't Complain about Heat, Plant a TREE" ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-02-25 10:02 Pradip Parkale <[email protected]> parent: Aditya Toshniwal <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Pradip Parkale @ 2020-02-25 10:02 UTC (permalink / raw) To: Akshay Joshi <[email protected]>; Aditya Toshniwal <[email protected]>; +Cc: Ashesh Vashi <[email protected]>; pgadmin-hackers Hi Akshay/Aditya, Please find the updated patch. I have accommodated all the changes. On Mon, Feb 24, 2020 at 2:34 PM Aditya Toshniwal < [email protected]> wrote: > Hi Pradip, > > - > commonUtils.findAndSetFocus($(alertifyDialog.elements.body).find('.tab-content > div.active')); > + > $(alertifyDialog.elements.dialog).find('[tabindex]:not([tabindex="-1"]').first().focus(); > > Use the same common function with > commonUtils.findAndSetFocus(alertifyDialog.elements.dialog)). It will > handle the focus. > Fixed. > Also, make the required changes mentioned on the pull request - > https://github.com/EnterpriseDB/AlertifyJS/pull/1 > Fixed. > > > On Fri, Feb 21, 2020 at 11:19 AM Akshay Joshi < > [email protected]> wrote: > >> Hi Aditya >> >> Can you please review this patch. >> >> On Wed, Feb 19, 2020 at 5:04 PM Pradip Parkale < >> [email protected]> wrote: >> >>> Please find the attached patch. >>> >>> On Wed, Feb 19, 2020 at 5:02 PM Ashesh Vashi < >>> [email protected]> wrote: >>> >>>> Forgot to attach the patch? >>>> >>>> On Wed, 19 Feb 2020 at 16:58, Pradip Parkale < >>>> [email protected]> wrote: >>>> >>>>> Hi Hackers, >>>>> >>>>> Attached is a patch for accessibility issue related Alertifyjs. >>>>> >>>>> 1. Added hidden label to satisfy accessibility. >>>>> 2. Added label with sr-only class. >>>>> 3. Added tabindex to move the mouse control to the maximize button >>>>> using the tab key. >>>>> >>>>> >>>>> Please note that this patch also includes the fix for the >>>>> RM-5143 Accessibility issue to maximize the panel for backup and restore >>>>> windows and all other places. >>>>> -- >>>>> Thanks & Regards, >>>>> Pradip Parkale >>>>> QMG, EnterpriseDB Corporation >>>>> >>>> -- >>>> >>>> -- >>>> >>>> Thanks & Regards, >>>> >>>> Ashesh Vashi >>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>>> <http://www.enterprisedb.com; >>>> >>>> >>>> *http://www.linkedin.com/in/asheshvashi* >>>> <http://www.linkedin.com/in/asheshvashi; >>>> >>> >>> >>> -- >>> Thanks & Regards, >>> Pradip Parkale >>> QMG, EnterpriseDB Corporation >>> >> >> >> -- >> *Thanks & Regards* >> *Akshay Joshi* >> >> *Sr. Software Architect* >> *EnterpriseDB Software India Private Limited* >> *Mobile: +91 976-788-8246* >> > > > -- > Thanks and Regards, > Aditya Toshniwal > pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune > "Don't Complain about Heat, Plant a TREE" > -- Thanks & Regards, Pradip Parkale QMG, EnterpriseDB Corporation Attachments: [application/octet-stream] RM5154_v2.patch (2.5K, 3-RM5154_v2.patch) download | inline diff: diff --git a/web/package.json b/web/package.json index acfcb2efa..ba92e291b 100644 --- a/web/package.json +++ b/web/package.json @@ -51,7 +51,7 @@ }, "dependencies": { "acitree": "git+https://github.com/imsurinder90/jquery-aciTree.git#rc.7", - "alertifyjs": "1.7.1", + "alertifyjs": "git+https://github.com/EnterpriseDB/AlertifyJS/#72c1d794f5b6d4ec13a68d123c08f19021afe263", "axios": "^0.18.1", "babel-plugin-transform-es2015-modules-amd": "^6.24.1", "babel-preset-es2015-without-strict": "~0.0.4", diff --git a/web/pgadmin/static/js/alertify/dialog_wrapper.js b/web/pgadmin/static/js/alertify/dialog_wrapper.js index 83186e710..5346b6a0d 100644 --- a/web/pgadmin/static/js/alertify/dialog_wrapper.js +++ b/web/pgadmin/static/js/alertify/dialog_wrapper.js @@ -64,7 +64,7 @@ export class DialogWrapper { $(alertifyDialog.elements.footer).on('keydown', 'button', function(event) { if (event.keyCode == 9 && $(this).nextAll('button:not([disabled])').length == 0) { // set focus back to first editable input element of current active tab once we cycle through all enabled buttons. - commonUtils.findAndSetFocus($(alertifyDialog.elements.body).find('.tab-content div.active')); + commonUtils.findAndSetFocus($(alertifyDialog.elements.dialog)); return false; } }); diff --git a/web/pgadmin/static/js/utils.js b/web/pgadmin/static/js/utils.js index 9f9ef32c7..86dae698e 100644 --- a/web/pgadmin/static/js/utils.js +++ b/web/pgadmin/static/js/utils.js @@ -37,6 +37,7 @@ export function findAndSetFocus(container) { .find(` .pgadmin-controls:first input:enabled, .pgadmin-controls:first .btn:not(.toggle), + .ajs-commands:first, .CodeMirror-scroll`) .find('*[tabindex]:not([tabindex="-1"])'); } diff --git a/web/yarn.lock b/web/yarn.lock index 26272668b..51334ccee 100644 --- a/web/yarn.lock +++ b/web/yarn.lock @@ -910,10 +910,9 @@ ajv@^6.1.0, ajv@^6.10.2, ajv@^6.9.1: json-schema-traverse "^0.4.1" uri-js "^4.2.2" [email protected]: +"alertifyjs@git+https://github.com/EnterpriseDB/AlertifyJS/#72c1d794f5b6d4ec13a68d123c08f19021afe263": version "1.7.1" - resolved "https://registry.yarnpkg.com/alertifyjs/-/alertifyjs-1.7.1.tgz#3c7b8ac67609aea737fe8e06d7fac885ce18ba8f" - integrity sha1-PHuKxnYJrqc3/o4G1/rIhc4Yuo8= + resolved "git+https://github.com/EnterpriseDB/AlertifyJS/#72c1d794f5b6d4ec13a68d123c08f19021afe263" alphanum-sort@^1.0.0: version "1.0.2" ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-02-25 12:56 Akshay Joshi <[email protected]> parent: Pradip Parkale <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Akshay Joshi @ 2020-02-25 12:56 UTC (permalink / raw) To: Pradip Parkale <[email protected]>; +Cc: Aditya Toshniwal <[email protected]>; Ashesh Vashi <[email protected]>; pgadmin-hackers Thanks, patch applied. On Tue, Feb 25, 2020 at 3:32 PM Pradip Parkale < [email protected]> wrote: > Hi Akshay/Aditya, > > Please find the updated patch. I have accommodated all the changes. > > > On Mon, Feb 24, 2020 at 2:34 PM Aditya Toshniwal < > [email protected]> wrote: > >> Hi Pradip, >> >> - >> commonUtils.findAndSetFocus($(alertifyDialog.elements.body).find('.tab-content >> div.active')); >> + >> $(alertifyDialog.elements.dialog).find('[tabindex]:not([tabindex="-1"]').first().focus(); >> >> Use the same common function with >> commonUtils.findAndSetFocus(alertifyDialog.elements.dialog)). It will >> handle the focus. >> > Fixed. > >> Also, make the required changes mentioned on the pull request - >> https://github.com/EnterpriseDB/AlertifyJS/pull/1 >> > Fixed. > >> >> >> On Fri, Feb 21, 2020 at 11:19 AM Akshay Joshi < >> [email protected]> wrote: >> >>> Hi Aditya >>> >>> Can you please review this patch. >>> >>> On Wed, Feb 19, 2020 at 5:04 PM Pradip Parkale < >>> [email protected]> wrote: >>> >>>> Please find the attached patch. >>>> >>>> On Wed, Feb 19, 2020 at 5:02 PM Ashesh Vashi < >>>> [email protected]> wrote: >>>> >>>>> Forgot to attach the patch? >>>>> >>>>> On Wed, 19 Feb 2020 at 16:58, Pradip Parkale < >>>>> [email protected]> wrote: >>>>> >>>>>> Hi Hackers, >>>>>> >>>>>> Attached is a patch for accessibility issue related Alertifyjs. >>>>>> >>>>>> 1. Added hidden label to satisfy accessibility. >>>>>> 2. Added label with sr-only class. >>>>>> 3. Added tabindex to move the mouse control to the maximize >>>>>> button using the tab key. >>>>>> >>>>>> >>>>>> Please note that this patch also includes the fix for the >>>>>> RM-5143 Accessibility issue to maximize the panel for backup and restore >>>>>> windows and all other places. >>>>>> -- >>>>>> Thanks & Regards, >>>>>> Pradip Parkale >>>>>> QMG, EnterpriseDB Corporation >>>>>> >>>>> -- >>>>> >>>>> -- >>>>> >>>>> Thanks & Regards, >>>>> >>>>> Ashesh Vashi >>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>>>> <http://www.enterprisedb.com; >>>>> >>>>> >>>>> *http://www.linkedin.com/in/asheshvashi* >>>>> <http://www.linkedin.com/in/asheshvashi; >>>>> >>>> >>>> >>>> -- >>>> Thanks & Regards, >>>> Pradip Parkale >>>> QMG, EnterpriseDB Corporation >>>> >>> >>> >>> -- >>> *Thanks & Regards* >>> *Akshay Joshi* >>> >>> *Sr. Software Architect* >>> *EnterpriseDB Software India Private Limited* >>> *Mobile: +91 976-788-8246* >>> >> >> >> -- >> Thanks and Regards, >> Aditya Toshniwal >> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >> "Don't Complain about Heat, Plant a TREE" >> > > > -- > Thanks & Regards, > Pradip Parkale > QMG, EnterpriseDB Corporation > -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-03-05 12:32 Pradip Parkale <[email protected]> parent: Akshay Joshi <[email protected]> 0 siblings, 1 reply; 9+ messages in thread From: Pradip Parkale @ 2020-03-05 12:32 UTC (permalink / raw) To: pgadmin-hackers Hi Hackers, Please find the updated patch for RM5143. On Tue, Feb 25, 2020 at 6:26 PM Akshay Joshi <[email protected]> wrote: > Thanks, patch applied. > > On Tue, Feb 25, 2020 at 3:32 PM Pradip Parkale < > [email protected]> wrote: > >> Hi Akshay/Aditya, >> >> Please find the updated patch. I have accommodated all the changes. >> >> >> On Mon, Feb 24, 2020 at 2:34 PM Aditya Toshniwal < >> [email protected]> wrote: >> >>> Hi Pradip, >>> >>> - >>> commonUtils.findAndSetFocus($(alertifyDialog.elements.body).find('.tab-content >>> div.active')); >>> + >>> $(alertifyDialog.elements.dialog).find('[tabindex]:not([tabindex="-1"]').first().focus(); >>> >>> Use the same common function with >>> commonUtils.findAndSetFocus(alertifyDialog.elements.dialog)). It will >>> handle the focus. >>> >> Fixed. >> >>> Also, make the required changes mentioned on the pull request - >>> https://github.com/EnterpriseDB/AlertifyJS/pull/1 >>> >> Fixed. >> >>> >>> >>> On Fri, Feb 21, 2020 at 11:19 AM Akshay Joshi < >>> [email protected]> wrote: >>> >>>> Hi Aditya >>>> >>>> Can you please review this patch. >>>> >>>> On Wed, Feb 19, 2020 at 5:04 PM Pradip Parkale < >>>> [email protected]> wrote: >>>> >>>>> Please find the attached patch. >>>>> >>>>> On Wed, Feb 19, 2020 at 5:02 PM Ashesh Vashi < >>>>> [email protected]> wrote: >>>>> >>>>>> Forgot to attach the patch? >>>>>> >>>>>> On Wed, 19 Feb 2020 at 16:58, Pradip Parkale < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Hi Hackers, >>>>>>> >>>>>>> Attached is a patch for accessibility issue related Alertifyjs. >>>>>>> >>>>>>> 1. Added hidden label to satisfy accessibility. >>>>>>> 2. Added label with sr-only class. >>>>>>> 3. Added tabindex to move the mouse control to the maximize >>>>>>> button using the tab key. >>>>>>> >>>>>>> >>>>>>> Please note that this patch also includes the fix for the >>>>>>> RM-5143 Accessibility issue to maximize the panel for backup and restore >>>>>>> windows and all other places. >>>>>>> -- >>>>>>> Thanks & Regards, >>>>>>> Pradip Parkale >>>>>>> QMG, EnterpriseDB Corporation >>>>>>> >>>>>> -- >>>>>> >>>>>> -- >>>>>> >>>>>> Thanks & Regards, >>>>>> >>>>>> Ashesh Vashi >>>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>>>>> <http://www.enterprisedb.com; >>>>>> >>>>>> >>>>>> *http://www.linkedin.com/in/asheshvashi* >>>>>> <http://www.linkedin.com/in/asheshvashi; >>>>>> >>>>> >>>>> >>>>> -- >>>>> Thanks & Regards, >>>>> Pradip Parkale >>>>> QMG, EnterpriseDB Corporation >>>>> >>>> >>>> >>>> -- >>>> *Thanks & Regards* >>>> *Akshay Joshi* >>>> >>>> *Sr. Software Architect* >>>> *EnterpriseDB Software India Private Limited* >>>> *Mobile: +91 976-788-8246* >>>> >>> >>> >>> -- >>> Thanks and Regards, >>> Aditya Toshniwal >>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >>> "Don't Complain about Heat, Plant a TREE" >>> >> >> >> -- >> Thanks & Regards, >> Pradip Parkale >> QMG, EnterpriseDB Corporation >> > > > -- > *Thanks & Regards* > *Akshay Joshi* > > *Sr. Software Architect* > *EnterpriseDB Software India Private Limited* > *Mobile: +91 976-788-8246* > -- Thanks & Regards, Pradip Parkale QMG, EnterpriseDB Corporation Attachments: [application/octet-stream] RM5143_v2.patch (7.1K, 3-RM5143_v2.patch) download | inline diff: diff --git a/web/pgadmin/about/static/js/about.js b/web/pgadmin/about/static/js/about.js index 5b711d4cc..c294ed65e 100644 --- a/web/pgadmin/about/static/js/about.js +++ b/web/pgadmin/about/static/js/about.js @@ -9,9 +9,9 @@ define( ['jquery', 'alertify', 'sources/pgadmin', 'sources/gettext', - 'sources/url_for', + 'sources/url_for','sources/utils', ], - function($, alertify, pgAdmin, gettext, url_for) { + function($, alertify, pgAdmin, gettext, url_for, commonUtils) { pgAdmin = pgAdmin || window.pgAdmin || {}; /* Return back, this has been called more than once */ @@ -43,8 +43,16 @@ define( build: function() { alertify.pgDialogBuild.apply(this); }, + hooks:{ + onshow:function(){ + var container = $(this.elements.footer).find('button:not([disabled])'); + commonUtils.findAndSetFocus(container); + }, + }, + prepare:function() { this.setContent(this.message); + }, }; }); diff --git a/web/pgadmin/static/js/alertify.pgadmin.defaults.js b/web/pgadmin/static/js/alertify.pgadmin.defaults.js index 206a3275a..84dfc12fe 100644 --- a/web/pgadmin/static/js/alertify.pgadmin.defaults.js +++ b/web/pgadmin/static/js/alertify.pgadmin.defaults.js @@ -8,8 +8,8 @@ ////////////////////////////////////////////////////////////// define([ - 'sources/gettext', 'alertify', 'jquery', -], function(gettext, alertify, $) { + 'sources/gettext', 'alertify', 'jquery', 'sources/utils', +], function(gettext, alertify, $, commonUtils) { alertify.defaults.transition = 'zoom'; alertify.defaults.theme.ok = 'btn btn-primary fa fa-lg fa-check pg-alertify-button'; alertify.defaults.theme.cancel = 'btn btn-secondary fa fa-lg fa-times pg-alertify-button'; @@ -263,7 +263,15 @@ define([ $(this.elements.commands.close).attr('aria-label', gettext('Close')); $(this.elements.commands.maximize).attr('aria-label', gettext('Maximize')); alertifyDialogResized.apply(this, arguments); - }); + let self = this; + + let cmds = Object.values(this.elements.commands); + $(cmds).on('keydown', 'button', (event) => { + if (event.shiftKey && event.keyCode == 9 && $(this).nextAll('button:not([disabled])').length == 0){ + let container = $(self.elements.footer); + commonUtils.findAndSetFocus(container.find('button:not([disabled]):last')); + } + }); }); this.set('onresize', alertifyDialogStartResizing.bind(this, true)); this.set('onresized', alertifyDialogResized.bind(this, true)); this.set('onmaximized', alertifyDialogResized); @@ -279,6 +287,15 @@ define([ this.__internal.buttons[i]['key'] = null; } } + let self = this; + + $(this.elements.footer).on('keydown', 'button', function(event) { + if (!event.shiftKey && event.keyCode == 9 && $(this).nextAll('button:not([disabled])').length == 0) { + // set focus back to first editable input element of current active tab once we cycle through all enabled buttons. + commonUtils.findAndSetFocus($(self.elements.dialog)); + return false; + } + }); }; alertify.pgHandleItemError = function(xhr, error, message, args) { diff --git a/web/pgadmin/static/js/alertify/dialog_wrapper.js b/web/pgadmin/static/js/alertify/dialog_wrapper.js index 5346b6a0d..e4c275f3a 100644 --- a/web/pgadmin/static/js/alertify/dialog_wrapper.js +++ b/web/pgadmin/static/js/alertify/dialog_wrapper.js @@ -60,14 +60,6 @@ export class DialogWrapper { this.pgBrowser.keyboardNavigation.getDialogTabNavigator($(alertifyDialog.elements.dialog)); const container = backform_tab.find('.tab-content:first > .tab-pane.active:first'); commonUtils.findAndSetFocus(container); - - $(alertifyDialog.elements.footer).on('keydown', 'button', function(event) { - if (event.keyCode == 9 && $(this).nextAll('button:not([disabled])').length == 0) { - // set focus back to first editable input element of current active tab once we cycle through all enabled buttons. - commonUtils.findAndSetFocus($(alertifyDialog.elements.dialog)); - return false; - } - }); } isNodeSelected(selectedTreeNode) { diff --git a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js index eaaae760b..e5f50fc7d 100644 --- a/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js +++ b/web/pgadmin/tools/grant_wizard/static/js/grant_wizard.js @@ -13,13 +13,14 @@ define([ 'pgadmin.alertifyjs', 'pgadmin.backgrid', 'pgadmin.backform', 'pgadmin.browser', 'pgadmin.browser.node', 'tools/grant_wizard/static/js/menu_utils', + 'sources/utils', 'sources/nodes/supported_database_node', 'backgrid.select.all', 'backgrid.filter', 'pgadmin.browser.server.privilege', 'pgadmin.browser.wizard', ], function( gettext, url_for, $, _, Backbone, Alertify, Backgrid, Backform, pgBrowser, - pgNode, menuUtils, supportedNodes + pgNode, menuUtils, commonUtils, supportedNodes ) { // if module is already initialized, refer to that. @@ -104,8 +105,6 @@ define([ // Do not use parent's render function. It set's tabindex to -1 on // checkboxes. - - var col = this.column.get('name'); let id = `row-${_.uniqueId(col)}`; this.$el.empty().append(` @@ -429,6 +428,35 @@ define([ }); }, + hooks: { + onshow: function() { + commonUtils.findAndSetFocus($(this.elements.body)); + let self = this; + let containerFooter = $(this.elements.content).find('.wizard-buttons').find('.ml-auto'); + //To get last header button + let lastHeaderButton = $(this.elements.content).find('.wizard-header').find('.ml-auto').find('button:first'); + + $(containerFooter).on('keydown', 'button', function(event) { + if (!event.shiftKey && event.keyCode == 9 && $(this).nextAll('button:not([disabled])').length == 0) { + // set focus back to first editable input element of current active tab once we cycle through all enabled buttons. + let container = $(self.elements.content).find('.wizard-header'); + commonUtils.findAndSetFocus(container.find('button:not([disabled]):first')); + return false; + } + }); + + $(lastHeaderButton).on('keydown', function(event) { + if (event.shiftKey && event.keyCode == 9) { + // set focus back to first element of current active tab once we cycle through all enabled buttons. + let container = $(self.elements.content).find('.wizard-footer'); + commonUtils.findAndSetFocus(container.find('button:not([disabled]):last')); + return false; + } + }); + + }, + }, + prepare: function() { var that = this; $container.empty().append('<div class=\'grant_wizard_container\'></div>'); ^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: [pgAdmin][RM5154] [Accessibility] : Alertify @ 2020-03-06 13:18 Akshay Joshi <[email protected]> parent: Pradip Parkale <[email protected]> 0 siblings, 0 replies; 9+ messages in thread From: Akshay Joshi @ 2020-03-06 13:18 UTC (permalink / raw) To: Pradip Parkale <[email protected]>; +Cc: pgadmin-hackers Thanks, patch applied. On Thu, Mar 5, 2020 at 6:02 PM Pradip Parkale < [email protected]> wrote: > Hi Hackers, > Please find the updated patch for RM5143. > > > On Tue, Feb 25, 2020 at 6:26 PM Akshay Joshi < > [email protected]> wrote: > >> Thanks, patch applied. >> >> On Tue, Feb 25, 2020 at 3:32 PM Pradip Parkale < >> [email protected]> wrote: >> >>> Hi Akshay/Aditya, >>> >>> Please find the updated patch. I have accommodated all the changes. >>> >>> >>> On Mon, Feb 24, 2020 at 2:34 PM Aditya Toshniwal < >>> [email protected]> wrote: >>> >>>> Hi Pradip, >>>> >>>> - >>>> commonUtils.findAndSetFocus($(alertifyDialog.elements.body).find('.tab-content >>>> div.active')); >>>> + >>>> $(alertifyDialog.elements.dialog).find('[tabindex]:not([tabindex="-1"]').first().focus(); >>>> >>>> Use the same common function with >>>> commonUtils.findAndSetFocus(alertifyDialog.elements.dialog)). It will >>>> handle the focus. >>>> >>> Fixed. >>> >>>> Also, make the required changes mentioned on the pull request - >>>> https://github.com/EnterpriseDB/AlertifyJS/pull/1 >>>> >>> Fixed. >>> >>>> >>>> >>>> On Fri, Feb 21, 2020 at 11:19 AM Akshay Joshi < >>>> [email protected]> wrote: >>>> >>>>> Hi Aditya >>>>> >>>>> Can you please review this patch. >>>>> >>>>> On Wed, Feb 19, 2020 at 5:04 PM Pradip Parkale < >>>>> [email protected]> wrote: >>>>> >>>>>> Please find the attached patch. >>>>>> >>>>>> On Wed, Feb 19, 2020 at 5:02 PM Ashesh Vashi < >>>>>> [email protected]> wrote: >>>>>> >>>>>>> Forgot to attach the patch? >>>>>>> >>>>>>> On Wed, 19 Feb 2020 at 16:58, Pradip Parkale < >>>>>>> [email protected]> wrote: >>>>>>> >>>>>>>> Hi Hackers, >>>>>>>> >>>>>>>> Attached is a patch for accessibility issue related Alertifyjs. >>>>>>>> >>>>>>>> 1. Added hidden label to satisfy accessibility. >>>>>>>> 2. Added label with sr-only class. >>>>>>>> 3. Added tabindex to move the mouse control to the maximize >>>>>>>> button using the tab key. >>>>>>>> >>>>>>>> >>>>>>>> Please note that this patch also includes the fix for the >>>>>>>> RM-5143 Accessibility issue to maximize the panel for backup and restore >>>>>>>> windows and all other places. >>>>>>>> -- >>>>>>>> Thanks & Regards, >>>>>>>> Pradip Parkale >>>>>>>> QMG, EnterpriseDB Corporation >>>>>>>> >>>>>>> -- >>>>>>> >>>>>>> -- >>>>>>> >>>>>>> Thanks & Regards, >>>>>>> >>>>>>> Ashesh Vashi >>>>>>> EnterpriseDB INDIA: Enterprise PostgreSQL Company >>>>>>> <http://www.enterprisedb.com; >>>>>>> >>>>>>> >>>>>>> *http://www.linkedin.com/in/asheshvashi* >>>>>>> <http://www.linkedin.com/in/asheshvashi; >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Thanks & Regards, >>>>>> Pradip Parkale >>>>>> QMG, EnterpriseDB Corporation >>>>>> >>>>> >>>>> >>>>> -- >>>>> *Thanks & Regards* >>>>> *Akshay Joshi* >>>>> >>>>> *Sr. Software Architect* >>>>> *EnterpriseDB Software India Private Limited* >>>>> *Mobile: +91 976-788-8246* >>>>> >>>> >>>> >>>> -- >>>> Thanks and Regards, >>>> Aditya Toshniwal >>>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune >>>> "Don't Complain about Heat, Plant a TREE" >>>> >>> >>> >>> -- >>> Thanks & Regards, >>> Pradip Parkale >>> QMG, EnterpriseDB Corporation >>> >> >> >> -- >> *Thanks & Regards* >> *Akshay Joshi* >> >> *Sr. Software Architect* >> *EnterpriseDB Software India Private Limited* >> *Mobile: +91 976-788-8246* >> > > > -- > Thanks & Regards, > Pradip Parkale > QMG, EnterpriseDB Corporation > -- *Thanks & Regards* *Akshay Joshi* *Sr. Software Architect* *EnterpriseDB Software India Private Limited* *Mobile: +91 976-788-8246* ^ permalink raw reply [nested|flat] 9+ messages in thread
end of thread, other threads:[~2020-03-06 13:18 UTC | newest] Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2020-02-19 11:28 [pgAdmin][RM5154] [Accessibility] : Alertify Pradip Parkale <[email protected]> 2020-02-19 11:32 ` Ashesh Vashi <[email protected]> 2020-02-19 11:34 ` Pradip Parkale <[email protected]> 2020-02-21 05:49 ` Akshay Joshi <[email protected]> 2020-02-24 09:03 ` Aditya Toshniwal <[email protected]> 2020-02-25 10:02 ` Pradip Parkale <[email protected]> 2020-02-25 12:56 ` Akshay Joshi <[email protected]> 2020-03-05 12:32 ` Pradip Parkale <[email protected]> 2020-03-06 13:18 ` Akshay Joshi <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox