public inbox for [email protected]
help / color / mirror / Atom feedFrom: Aditya Toshniwal <[email protected]>
To: pgadmin-hackers <[email protected]>
Subject: Re: [pgAdmin][RM5197] Accessibility issues of external packages
Date: Fri, 5 Jun 2020 17:01:44 +0530
Message-ID: <CAM9w-_matuqv+4ya=ZuK0dugg+zMpp=AGceCij+baHbUJcJMLg@mail.gmail.com> (raw)
In-Reply-To: <CANxoLDcodBdSmA4nC57oajyp=zXf1g3eBNn30anQiXSpxAduew@mail.gmail.com>
References: <CAM9w-_kMKPOGs47ph7ZmWAehgZy-AZdcRJOD_kK0J2oZRfKavw@mail.gmail.com>
<CANxoLDcodBdSmA4nC57oajyp=zXf1g3eBNn30anQiXSpxAduew@mail.gmail.com>
Hi Hackers,
Attached is the patch to update Codemirror version to latest which allows
us to set screen reader labels on Codemirror editor. This is part of #5197.
Please review.
On Fri, Apr 3, 2020 at 5:14 PM Akshay Joshi <[email protected]>
wrote:
> Thanks, patch applied.
>
> On Thu, Apr 2, 2020 at 4:46 PM Aditya Toshniwal <
> [email protected]> wrote:
>
>> Hi Hackers,
>>
>> Attached patch will replace the existing color picker -
>> spectrum-colorpicker with @simonwep/pickr.
>> spectrum-colorpicker has accessibility issues and is not maintained since
>> long. @simonwep/pickr is actively maintained and the package is improving
>> its accessibility actively.
>>
>> Please review.
>>
>> --
>> Thanks and Regards,
>> Aditya Toshniwal
>> pgAdmin Hacker | Sr. Software Engineer | EnterpriseDB India | Pune
>> "Don't Complain about Heat, Plant a TREE"
>>
>
>
> --
> *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"
Attachments:
[application/octet-stream] RM5197.codemirror.patch (4.5K, 3-RM5197.codemirror.patch)
download | inline diff:
diff --git a/web/package.json b/web/package.json
index 50fa28b73..6e316c670 100644
--- a/web/package.json
+++ b/web/package.json
@@ -67,7 +67,7 @@
"bootstrap4-toggle": "3.4.0",
"bowser": "2.1.2",
"browserify": "~16.2.3",
- "codemirror": "^5.50.0",
+ "codemirror": "^5.54.0",
"css-loader": "2.1.0",
"cssnano": "^4.1.10",
"dropzone": "^5.5.1",
diff --git a/web/pgadmin/browser/static/js/browser.js b/web/pgadmin/browser/static/js/browser.js
index 2a96396fd..9c68af1e5 100644
--- a/web/pgadmin/browser/static/js/browser.js
+++ b/web/pgadmin/browser/static/js/browser.js
@@ -428,6 +428,7 @@ define('pgadmin.browser', [
mode: 'text/x-pgsql',
readOnly: true,
extraKeys: pgAdmin.Browser.editor_shortcut_keys,
+ screenReaderLabel: gettext('SQL'),
});
/* Cache may take time to load for the first time
* Reflect the changes once cache is available
diff --git a/web/pgadmin/static/js/backform.pgadmin.js b/web/pgadmin/static/js/backform.pgadmin.js
index e8133a9ff..d7cb3b710 100644
--- a/web/pgadmin/static/js/backform.pgadmin.js
+++ b/web/pgadmin/static/js/backform.pgadmin.js
@@ -1810,12 +1810,15 @@ define([
// Use the Backform Control's render function
Backform.Control.prototype.render.apply(this, arguments);
+ var field = _.defaults(this.field.toJSON(), this.defaults);
+
this.sqlCtrl = CodeMirror.fromTextArea(
(this.$el.find('textarea')[0]), {
lineNumbers: true,
mode: 'text/x-pgsql',
readOnly: true,
extraKeys: pgAdmin.Browser.editor_shortcut_keys,
+ screenReaderLabel: field.label,
});
this.reflectPreferences();
@@ -2574,6 +2577,7 @@ define([
lineNumbers: true,
mode: 'text/x-pgsql',
extraKeys: pgAdmin.Browser.editor_shortcut_keys,
+ screenReaderLabel: data.label,
});
self.reflectPreferences();
diff --git a/web/pgadmin/tools/datagrid/static/js/show_data.js b/web/pgadmin/tools/datagrid/static/js/show_data.js
index d2700cfbf..2232294d6 100644
--- a/web/pgadmin/tools/datagrid/static/js/show_data.js
+++ b/web/pgadmin/tools/datagrid/static/js/show_data.js
@@ -193,6 +193,7 @@ function initFilterDialog(alertify, pgBrowser) {
lineWrapping: that.preferences.wrap_code,
autoCloseBrackets: that.preferences.insert_pair_brackets,
matchBrackets: that.preferences.brace_matching,
+ screenReaderLabel: gettext('Filter SQL'),
});
let sql_font_size = SqlEditorUtils.calcFontSize(that.preferences.sql_font_size);
diff --git a/web/pgadmin/tools/debugger/static/js/direct.js b/web/pgadmin/tools/debugger/static/js/direct.js
index 5011c4a5a..ee41f9c7f 100644
--- a/web/pgadmin/tools/debugger/static/js/direct.js
+++ b/web/pgadmin/tools/debugger/static/js/direct.js
@@ -1806,6 +1806,7 @@ define([
lineWrapping: pgAdmin.Browser.editor_options.wrapCode,
autoCloseBrackets: pgAdmin.Browser.editor_options.insert_pair_brackets,
matchBrackets: pgAdmin.Browser.editor_options.brace_matching,
+ screenReaderLabel: gettext('Debugger SQL editor'),
});
// Useful for keyboard navigation, when user presses escape key we will
diff --git a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
index fe4b6b5e0..4a604a691 100644
--- a/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
+++ b/web/pgadmin/tools/sqleditor/static/js/sqleditor.js
@@ -374,6 +374,7 @@ define('tools.querytool', [
extraKeys: pgBrowser.editor_shortcut_keys,
scrollbarStyle: 'simple',
dragDrop: false,
+ screenReaderLabel: gettext('SQL editor'),
});
if(self.handler.is_query_tool) {
diff --git a/web/yarn.lock b/web/yarn.lock
index 151e98cb3..d636df5cb 100644
--- a/web/yarn.lock
+++ b/web/yarn.lock
@@ -2363,10 +2363,10 @@ coa@^2.0.2:
chalk "^2.4.1"
q "^1.1.2"
-codemirror@^5.50.0:
- version "5.52.2"
- resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.52.2.tgz#c29e1f7179f85eb0dd17c0586fa810e4838ff584"
- integrity sha512-WCGCixNUck2HGvY8/ZNI1jYfxPG5cRHv0VjmWuNzbtCLz8qYA5d+je4QhSSCtCaagyeOwMi/HmmPTjBgiTm2lQ==
+codemirror@^5.54.0:
+ version "5.54.0"
+ resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.54.0.tgz#82b6adf662b29eeb7b867fe7839d49e25e4a0b38"
+ integrity sha512-Pgf3surv4zvw+KaW3doUU7pGjF0BPU8/sj7eglWJjzni46U/DDW8pu3nZY0QgQKUcICDXRkq8jZmq0y6KhxM3Q==
collection-visit@^1.0.0:
version "1.0.0"
view thread (4+ 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][RM5197] Accessibility issues of external packages
In-Reply-To: <CAM9w-_matuqv+4ya=ZuK0dugg+zMpp=AGceCij+baHbUJcJMLg@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