From 0b8fe36b0d15d32e03f8961396c3459170214eb0 Mon Sep 17 00:00:00 2001 From: Pranav Yadav Date: Thu, 27 Oct 2022 18:29:35 +0000 Subject: [PATCH 1/3] chore: update Links to Design Pattern > Assessment - point to correct ARIA APG - fix various broken links w/ (typos) --- .../custom-widgets-column-renderer.tsx | 54 +++++++++---------- 1 file changed, 25 insertions(+), 29 deletions(-) diff --git a/src/assessments/custom-widgets/custom-widgets-column-renderer.tsx b/src/assessments/custom-widgets/custom-widgets-column-renderer.tsx index 6d9a46f4f89..1c9dd5349ca 100644 --- a/src/assessments/custom-widgets/custom-widgets-column-renderer.tsx +++ b/src/assessments/custom-widgets/custom-widgets-column-renderer.tsx @@ -55,94 +55,90 @@ function makeFlatDesignPatternString(patterns: DesignPattern[]): string { } const roleToDesignPatternsMapping: DictionaryStringTo = { - alert: [{ designPattern: 'Alert', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#alert' }], + alert: [{ designPattern: 'Alert', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/alert' }], alertdialog: [ { - designPattern: 'Alert or Message Dialog', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#alertdialog', + designPattern: 'Alert and Message Dialogs', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog', }, ], button: [ { designPattern: 'Accordion', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#accordion', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/accordion', }, - { designPattern: 'Button', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#button' }, + { designPattern: 'Button', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/button' }, { designPattern: 'Disclosure (Show/Hide)', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/disclosure', }, { designPattern: 'Menu Button', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/menubutton', }, ], checkbox: [ { designPattern: 'Checkbox', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#checkbox', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/checkbox', }, ], combobox: [ { designPattern: 'Combo Box', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#combobox', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/combobox', }, ], dialog: [ { designPattern: 'Dialog (Modal)', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#dialog_modal', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal', }, ], - feed: [{ designPattern: 'Feed', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#feed' }], - grid: [{ designPattern: 'Grid', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#grid' }], - link: [{ designPattern: 'Link', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#link' }], + feed: [{ designPattern: 'Feed', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/feed' }], + grid: [{ designPattern: 'Grid', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/grid' }], + link: [{ designPattern: 'Link', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/link' }], listbox: [ - { designPattern: 'Listbox', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#Listbox' }, - ], - menu: [{ designPattern: 'Menu', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#menu' }], - menubar: [ - { designPattern: 'Menu Bar', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#menu' }, + { designPattern: 'Listbox', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/listbox' }, ], + menu: [{ designPattern: 'Menu', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/menu' }], + menubar: [{ designPattern: 'Menu Bar', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/menu' }], radiogroup: [ { designPattern: 'Radio Group', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#radiobutton', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/radiobutton', }, ], separator: [ { designPattern: 'Window Splitter', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#windowsplitter', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/windowsplitter', }, ], slider: [ - { designPattern: 'Slider', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#slider' }, + { designPattern: 'Slider', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/slider' }, { designPattern: 'Slider (Multi-thumb)', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#sliderwothumb', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/slidertwothumb', }, ], spinbutton: [ { designPattern: 'Spinbutton', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#spinbutton', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/spinbutton', }, ], - tablist: [ - { designPattern: 'Tabs', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#tabpanel' }, - ], + tablist: [{ designPattern: 'Tabs', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel' }], toolbar: [ - { designPattern: 'Toolbar', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#toolbar' }, + { designPattern: 'Toolbar', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/toolbar' }, ], tooltip: [ - { designPattern: 'Tooltip', URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#tooltip' }, + { designPattern: 'Tooltip', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/tooltip' }, ], tree: [ { designPattern: 'Tree View', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#TreeView', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/treeview', }, ], }; From fcaebdcbbc281955ce752042a24cd4ae92e6dc6f Mon Sep 17 00:00:00 2001 From: Pranav Yadav Date: Fri, 28 Oct 2022 23:28:48 +0530 Subject: [PATCH 2/3] fix typo :) --- .../custom-widgets/custom-widgets-column-renderer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/assessments/custom-widgets/custom-widgets-column-renderer.tsx b/src/assessments/custom-widgets/custom-widgets-column-renderer.tsx index 1c9dd5349ca..8328e6a016b 100644 --- a/src/assessments/custom-widgets/custom-widgets-column-renderer.tsx +++ b/src/assessments/custom-widgets/custom-widgets-column-renderer.tsx @@ -58,7 +58,7 @@ const roleToDesignPatternsMapping: DictionaryStringTo = { alert: [{ designPattern: 'Alert', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/alert' }], alertdialog: [ { - designPattern: 'Alert and Message Dialogs', + designPattern: 'Alert or Message Dialog', URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/alertdialog', }, ], From 114af3faabc94047b8a0bbfc01a9d3b233dcf74e Mon Sep 17 00:00:00 2001 From: Pranav Yadav Date: Fri, 28 Oct 2022 19:10:05 +0000 Subject: [PATCH 3/3] fix tests (ARAI APG Patterns links) --- .../custom-widgets-column-renderer.test.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/tests/unit/tests/assessments/custom-widgets/custom-widgets-column-renderer.test.tsx b/src/tests/unit/tests/assessments/custom-widgets/custom-widgets-column-renderer.test.tsx index 98ff7fa7de5..3b4ebfb5149 100644 --- a/src/tests/unit/tests/assessments/custom-widgets/custom-widgets-column-renderer.test.tsx +++ b/src/tests/unit/tests/assessments/custom-widgets/custom-widgets-column-renderer.test.tsx @@ -62,19 +62,19 @@ describe('CustomWidgetsColumnRenderer', () => { const expectedValues = [ { designPattern: 'Accordion', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#accordion', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/accordion', }, { designPattern: 'Button', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#button', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/button', }, { designPattern: 'Disclosure (Show/Hide)', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#disclosure', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/disclosure', }, { designPattern: 'Menu Button', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#menubutton', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/menubutton', }, ]; item.instance.propertyBag.role = 'button'; @@ -103,11 +103,11 @@ describe('CustomWidgetsColumnRenderer', () => { const expectedValues = [ { designPattern: 'Slider', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#slider', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/slider', }, { designPattern: 'Slider (Multi-thumb)', - URL: 'https://www.w3.org/TR/wai-aria-practices-1.1/#sliderwothumb', + URL: 'https://www.w3.org/WAI/ARIA/apg/patterns/slidertwothumb', }, ]; item.instance.propertyBag.role = 'slider';