mirror of
https://gh.wpcy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-04-24 05:16:00 +08:00
* PHPCS and remediation POC WIP * WIP Wizard module * Added scanner module * [APP-929][APP-930] Add initial setup for wizard, added btn to the topbar (#230) * [APP-929][APP-930] * [APP-929][APP-930] * update logic * update init app * [APP-0000] store plan scope after register/switch * change return of load * add header * Move into shadow dom, add context, add headers components * add UI components * add UI components * add UI components * merge current develop * merge current develop * Add AltText Form * Add scroll to current element * Align with current design, add loader, added preview for svg * Align with current design, add loader, added preview for svg * Resolve comments * Resolve comments * Resolve comments * [APP-934] add submit logic (#259) * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * [APP-934] add submit logic * Added replace remediation action * Add submit logic * Add submit alt text logic, generate AI alt text * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add AI generate request, add convert from SVG to png base64, added manual fix block * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation * Add texts, add remediation submit, fix logic to store remediation --------- Co-authored-by: Raz Ohad <admin@bainternet.info> * Add texts, add remediation submit, fix logic to store remediation * [APP-0000] add store request to the Service API (#268) * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add store request to the Service API * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-0000] add request to store scanner summary * [APP-1432] fix with AI flow (#275) * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1432] fix with AI flow * [APP-1446] sidebar menu update (#276) * update: simplify menu * add: headings and scanner menu options * [APP-945] add column for tables (#282) * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-945] add column for tables * [APP-1447] Updated quota bar designs (#278) * update: quota bar designs * fix: the popover was partially visible * update: AI credits name * update: usage calculation logic * add: quota indicators * update: quotas tooltip text * update: quotas notices text * update: make toggle icon dynamic * fix: @elementor/ui imports * Update modules/settings/assets/js/layouts/quota-bar.js Co-authored-by: VasylD <vasyld@elementor.red> * update: styling of component --------- Co-authored-by: VasylD <vasyld@elementor.red> * [APP-1507] add UI changes (#286) * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1507] add UI changes * [APP-1387] add mixpanel events (#288) * [APP-1387] add mixpanel events * [APP-1387] add mixpanel events * New: Add the a11y assistant dashboard's UI [APP-1445] (#289) * [APP-1513] add disconnected msg (#290) * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1513] add disconnected msg * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues (#291) * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * [APP-1547][APP-1548][APP-948] update alt text view, fix list issues, add rest route for update status * fix: infotip icon padding and font style (#293) * fix: infotip icon padding and font style * fix: infotip icon padding and font style * update: caniuse database * [APP-1525] add edit mode (#294) * [APP-1525] add edit mode * [APP-1525] add edit mode * [APP-1525] add edit mode * Bug/app 1544 (#295) * Fix: Resolve QA comments [APP-1544] * New: Add beta tags [APP-1555] * New: Add the "no results" state [APP-1544] * [APP-1554] rename violations (#297) * [APP-1512] add backend logic for remediation management (#298) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Fix: Resolve QA comments [n/a] (#299) * [APP-1512] add FE remediation management (#300) * [APP-1512] add backend logic for remediation management * [APP-1512] add backend logic for remediation management * Update modules/remediation/database/remediation-entry.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * Update modules/remediation/rest/items.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1512] add backend logic for remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management * [APP-1512] add FE remediation management --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1609] fix tooltip * [APP-1609] fix resolved btn click * [APP-1401] clear cache on update (#302) * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * [APP-1401] clear cache on update * update with latest develop branch * fix copies * [APP-1619] add mixpanel event (#303) * [APP-1619] add mixpanel event * [APP-1619] add mixpanel event * [APP-1593] Add locked variant for quota bar (#301) * update: add locked version of quota status bar * fix: text color for infotip * fix: width issues * fix: add check for 0 * [APP-1637][APP-1643] add UI fixes, add excluded rules array (#307) * fix: make sidebar collapsible (#306) * Merge current dev * [APP-1603] Add dashboard menu (#309) * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * [APP-1603] Add dashboard menu * Bug/app 1607 (#311) * Fix: Update stats calculation logic [APP-1607] * Fix: Set fixed width for the results table [APP-1650] * Fix: Update filter rules [APP-1634] * New: Add the no search results state [APP-1651] * Fix: Convert indents [n/a] * [APP-1670] add menu on Manage Fixes (#315) * [APP-1670] add menu on Manage Fixes * [APP-1670] update menu * [APP-1611] fix comments * fix: direction of snippet (#313) * [APP-1561] New menu layout (#308) * update: app menu and layout * merge: latest changes from feature/remediation * add: alert indicator to the closed sidebar * fix: page layout for statement page * update: menu display names * fix: topbar menu layout * update: sidebar menu width * update: sidebar menu width * fix: popup menu layout * add: hover action to the toggle button * update: my account menu * fix: quota indicator for closed sidebar * fix: icon alignments * fix: scroll behaviour * fix: page scroll behaviour * fix: popup menu hover state * update: quota bar and group layouts * add: tooltips to the menu items * update: make scans page fixed height and scrollable * update: styles with theme references and added new styled components * fix: make sidebar smoother * update: accessibility page heading * Merge latest develop * [APP-1611] trigger save entry for clean cache (#314) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async (#319) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * fix: scrollbar issues (#318) * [APP-1615] add remediation for wp image (#321) * POC - FrontEnd remediations to handle Dynamic Data [APP-1644] (#312) * POC - FrontEnd remediations to handle Dynamic Data * Update modules/remediation/components/remediation-runner.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * added MutationObserver to cover elements that are added later on the page runs until remediations are all done, and disconnect * added $use_frontend flag instead of using "false" * Update modules/remediation/components/remediation-runner.php Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * WIP on poc/fe-remediations * [APP-0000] call trigger save async * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * [APP-1644] apply FE remediation * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Add timeout (wait for FE remediation timeout) * Small fixes * Small fixes * Small fixes * Small fixes --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> Co-authored-by: vasyldinets <vasyld@elementor.red> * [APP-1611] Fix cache issue (#324) * [APP-1611] trigger save entry for clean cache * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-1611] fix comments * [APP-0000] call trigger save async * [APP-1611] clear cache * [APP-1657] upgrade cta (#323) * update: added logic to show button based on plan * Update modules/settings/assets/js/components/quota-bar/quota-bar-group.js Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * fix: eslint error --------- Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com> * [APP-1658] Update accessibility admin column design (#322) * update: wpadmin column layout * update: move icon to assets * Fix: Resolve remediation encoding issue [APP-1646] (#325) --------- Co-authored-by: Ohad <ohad@elementor.com> Co-authored-by: Raz Ohad <admin@bainternet.info> Co-authored-by: Nirbhay Singh <121793120+nirbhayel@users.noreply.github.com> Co-authored-by: Pavlo Kniazevych <139438463+pkniazevych@users.noreply.github.com> Co-authored-by: gitstream-cm[bot] <111687743+gitstream-cm[bot]@users.noreply.github.com>
226 lines
6.2 KiB
JavaScript
226 lines
6.2 KiB
JavaScript
import { __ } from '@wordpress/i18n';
|
|
|
|
export const TOP_BAR_LINK = '#wp-admin-bar-ea11y-scanner-wizard a';
|
|
|
|
export const SCANNER_URL_PARAM = 'open-ea11y-assistant';
|
|
export const MANAGE_URL_PARAM = 'open-ea11y-manage';
|
|
export const ROOT_ID = 'ea11y-scanner-wizard-widget';
|
|
|
|
export const CURRENT_ELEMENT_CLASS = 'ea11y-scanner-current-element';
|
|
|
|
export const UPGRADE_URL = 'https://go.elementor.com/acc-free-no-AI-scanner';
|
|
export const COMPARE_PLAN_URL = 'https://go.elementor.com/acc-AI-limit-scanner';
|
|
export const PAGE_LIMIT_URL = 'https://go.elementor.com/acc-URL-limit-scanner';
|
|
|
|
export const isRTL = Boolean(window.ea11yScannerData?.isRTL);
|
|
|
|
export const IS_AI_ENABLED = !window.ea11yScannerData?.planData?.plan?.name
|
|
?.toLowerCase()
|
|
.includes('free');
|
|
export const AI_QUOTA_LIMIT =
|
|
window.ea11yScannerData?.planData?.aiCredits?.allowed -
|
|
window.ea11yScannerData?.planData?.aiCredits?.used >
|
|
0;
|
|
|
|
export const PAGE_PER_PLAN =
|
|
window.ea11yScannerData?.planData?.scannedPages?.allowed;
|
|
|
|
export const PAGE_QUOTA_LIMIT =
|
|
window.ea11yScannerData?.planData?.scannedPages?.allowed -
|
|
window.ea11yScannerData?.planData?.scannedPages?.used >
|
|
0;
|
|
|
|
export const BLOCKS = {
|
|
main: 'main',
|
|
management: 'management',
|
|
altText: 'altText',
|
|
dynamicContent: 'dynamicContent',
|
|
formsInputsError: 'formsInputsError',
|
|
keyboardAssistiveTech: 'keyboardAssistiveTech',
|
|
pageStructureNav: 'pageStructureNav',
|
|
tables: 'tables',
|
|
colorContrast: 'colorContrast',
|
|
other: 'other',
|
|
};
|
|
|
|
export const MANUAL_GROUPS = {
|
|
dynamicContent: [],
|
|
formsInputsError: [],
|
|
keyboardAssistiveTech: [],
|
|
pageStructureNav: [],
|
|
tables: [],
|
|
colorContrast: [],
|
|
other: [],
|
|
};
|
|
|
|
export const BLOCK_TITLES = {
|
|
altText: __('Alternative text', 'pojo-accessibility'),
|
|
dynamicContent: __('Dynamic Content & ARIA', 'pojo-accessibility'),
|
|
formsInputsError: __('Forms & Input Errors', 'pojo-accessibility'),
|
|
keyboardAssistiveTech: __(
|
|
'Keyboard & Assistive Technologies',
|
|
'pojo-accessibility',
|
|
),
|
|
pageStructureNav: __('Page Structure & Navigation', 'pojo-accessibility'),
|
|
tables: __('Tables', 'pojo-accessibility'),
|
|
colorContrast: __('Color Contrast & Style', 'pojo-accessibility'),
|
|
other: __('Other Accessibility Issues', 'pojo-accessibility'),
|
|
};
|
|
|
|
export const BLOCK_INFO = {
|
|
altText: __(
|
|
"Clearly describe images so people using screen readers understand what's displayed.",
|
|
'pojo-accessibility',
|
|
),
|
|
dynamicContent: __(
|
|
'Label interactive content clearly, helping screen reader users navigate dynamic elements.',
|
|
'pojo-accessibility',
|
|
),
|
|
formsInputsError: __(
|
|
"Clearly label form fields and errors so people know exactly what's needed.",
|
|
'pojo-accessibility',
|
|
),
|
|
keyboardAssistiveTech: __(
|
|
'Make sure people can fully use your site with only a keyboard, no mouse required.',
|
|
'pojo-accessibility',
|
|
),
|
|
pageStructureNav: __(
|
|
'Use headings and clear structure to help people easily navigate your content.',
|
|
'pojo-accessibility',
|
|
),
|
|
tables: __(
|
|
'Give tables clear headers and captions so everyone can easily understand the data.',
|
|
'pojo-accessibility',
|
|
),
|
|
colorContrast: __(
|
|
'Choose colors with strong contrast to ensure your text is readable for everyone.',
|
|
'pojo-accessibility',
|
|
),
|
|
other: __(
|
|
'Find and resolve additional accessibility issues to ensure your site works for everyone.',
|
|
'pojo-accessibility',
|
|
),
|
|
};
|
|
|
|
export const INITIAL_SORTED_VIOLATIONS = {
|
|
altText: [],
|
|
dynamicContent: [],
|
|
formsInputsError: [],
|
|
keyboardAssistiveTech: [],
|
|
pageStructureNav: [],
|
|
tables: [],
|
|
colorContrast: [],
|
|
other: [],
|
|
};
|
|
|
|
export const VIOLATION_TYPES = {
|
|
altText: [
|
|
'applet_alt_exists',
|
|
'applet_alt_exists',
|
|
'img_alt_redundant',
|
|
'img_alt_valid',
|
|
'img_alt_null',
|
|
'area_alt_exists',
|
|
'imagebutton_alt_exists',
|
|
'imagemap_alt_exists',
|
|
'img_alt_decorative',
|
|
'object_text_exists',
|
|
'svg_graphics_labelled',
|
|
],
|
|
dynamicContent: [
|
|
'aria_parent_required',
|
|
'combobox_popup_reference',
|
|
'aria_activedescendant_valid',
|
|
'combobox_active_descendant',
|
|
'aria_role_valid',
|
|
'combobox_autocomplete_valid',
|
|
'combobox_focusable_elements',
|
|
'combobox_haspopup_valid',
|
|
'aria_descendant_valid',
|
|
'aria_role_allowed',
|
|
'aria_attribute_allowed',
|
|
'aria_attribute_conflict',
|
|
'aria_attribute_exists',
|
|
'aria_attribute_required',
|
|
'aria_attribute_value_valid',
|
|
'aria_eventhandler_role_valid',
|
|
'aria_id_unique',
|
|
'aria_widget_labelled',
|
|
'combobox_design_valid',
|
|
'element_id_unique',
|
|
'element_accesskey_unique',
|
|
'aria_attribute_valid',
|
|
],
|
|
formsInputsError: [
|
|
'label_content_exists',
|
|
'input_checkboxes_grouped',
|
|
'fieldset_label_valid',
|
|
'form_label_unique',
|
|
'label_ref_valid',
|
|
'input_autocomplete_valid',
|
|
'error_message_exists',
|
|
'input_label_after',
|
|
'input_label_before',
|
|
'input_label_exists',
|
|
],
|
|
keyboardAssistiveTech: [
|
|
'aria_hidden_nontabbable',
|
|
'aria_activedescendant_tabindex_valid',
|
|
'aria_child_tabbable',
|
|
'element_scrollable_tabbable',
|
|
'iframe_interactive_tabbable',
|
|
'a_text_purpose',
|
|
'label_name_visible',
|
|
'html_lang_exists',
|
|
'html_lang_valid',
|
|
'element_lang_valid',
|
|
'input_haspopup_conflict',
|
|
'element_tabbable_role_valid',
|
|
],
|
|
pageStructureNav: [
|
|
'table_headers_ref_valid',
|
|
'table_scope_valid',
|
|
'table_headers_exists',
|
|
'table_headers_related',
|
|
'table_structure_misuse',
|
|
'dir_attribute_valid',
|
|
'aria_application_label_unique',
|
|
'aria_application_labelled',
|
|
'aria_article_label_unique',
|
|
'aria_banner_label_unique',
|
|
'aria_banner_single',
|
|
'aria_complementary_label_unique',
|
|
'aria_complementary_labelled',
|
|
'aria_content_in_landmark',
|
|
'aria_contentinfo_label_unique',
|
|
'aria_contentinfo_single',
|
|
'aria_document_label_unique',
|
|
'aria_form_label_unique',
|
|
'aria_landmark_name_unique',
|
|
'aria_main_label_unique',
|
|
'aria_navigation_label_unique',
|
|
'aria_region_label_unique',
|
|
'aria_region_labelled',
|
|
'aria_search_label_unique',
|
|
'aria_toolbar_label_unique',
|
|
'skip_main_exists',
|
|
'page_title_exists',
|
|
'frame_title_exists',
|
|
'list_children_valid',
|
|
'table_aria_descendants',
|
|
],
|
|
tables: [
|
|
'table_caption_empty',
|
|
'table_caption_nested',
|
|
'table_summary_redundant',
|
|
],
|
|
colorContrast: ['text_spacing_valid', 'text_contrast_sufficient'],
|
|
other: [
|
|
'element_orientation_unlocked',
|
|
'meta_redirect_optional',
|
|
'blink_elem_deprecated',
|
|
'marquee_elem_avoid',
|
|
],
|
|
};
|
|
|
|
export const EXCLUDE_FROM_AI = ['aria_content_in_landmark'];
|