From 0da78715a3c9bf578e25cf0576656ea74844d6ef Mon Sep 17 00:00:00 2001 From: 321gillian Date: Tue, 21 May 2024 11:31:06 +0100 Subject: [PATCH] feat(selector-card): Add descriptive variant for radio selector card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: COMUI-2784 --- .../gux-selector-cards/a11yManualChecklist.md | 16 ++ .../beta/gux-selector-cards/example.html | 59 ++++ .../gux-selector-card/example.html | 88 +++++- .../gux-selector-card/gux-selector-card.scss | 201 ++++++++----- .../gux-selector-card/gux-selector-card.tsx | 27 +- .../gux-selector-card/readme.md | 14 +- .../gux-selector-card.spec.ts.snap | 269 +++++++++++++++--- .../tests/gux-selector-card.spec.ts | 85 +++++- .../gux-selector-cards.e2e.ts.snap | 4 +- .../gux-selector-cards.spec.ts.snap | 75 +++++ .../tests/gux-selector-cards.e2e.ts | 43 ++- .../tests/gux-selector-cards.spec.ts | 43 ++- 12 files changed, 801 insertions(+), 123 deletions(-) create mode 100644 packages/genesys-spark-components/src/components/beta/gux-selector-cards/a11yManualChecklist.md diff --git a/packages/genesys-spark-components/src/components/beta/gux-selector-cards/a11yManualChecklist.md b/packages/genesys-spark-components/src/components/beta/gux-selector-cards/a11yManualChecklist.md new file mode 100644 index 000000000..a3ac2b2a2 --- /dev/null +++ b/packages/genesys-spark-components/src/components/beta/gux-selector-cards/a11yManualChecklist.md @@ -0,0 +1,16 @@ +# gux-selector-cards manual accessibility testing status + +**Last Updated:** 2024-05-29T14:11:41.083Z +| Pass | WCAG Success Criterion | Notes | +| --- | --- | --- | +| ✅ | [2.1.1 Keyboard](https://www.w3.org/WAI/WCAG21/Understanding/keyboard.html) | - | +| ✅ | [2.1.2 No Keyboard Trap](https://www.w3.org/WAI/WCAG21/Understanding/no-keyboard-trap.html) | - | +| ✅ | [2.4.3 Focus Order](https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html) | - | +| ✅ | [2.4.7 Focus Visible](https://www.w3.org/WAI/WCAG21/Understanding/focus-visible.html) | - | +| ✅ | [2.5.3 Label in Name](https://www.w3.org/WAI/WCAG21/Understanding/label-in-name.html#dfn-name) | - | +| ✅ | [3.2.1 On Focus](https://www.w3.org/WAI/WCAG21/Understanding/on-focus.html) | - | +| ✅ | [3.2.2 On Input](https://www.w3.org/WAI/WCAG21/Understanding/on-input.html) | - | +| ✅ | [3.3.1 Error Identification](https://www.w3.org/WAI/WCAG21/Understanding/error-identification.html) | - | +| ✅ | [3.2.2 Labels or Instructions](https://www.w3.org/WAI/WCAG21/Understanding/labels-or-instructions.html) | - | +| ✅ | [4.1.2: Name, Role, Value](https://www.w3.org/WAI/WCAG21/Understanding/name-role-value.html) | - | +| ✅ | [4.1.3 Status Messages](https://www.w3.org/WAI/WCAG21/Understanding/status-messages.html) | - | diff --git a/packages/genesys-spark-components/src/components/beta/gux-selector-cards/example.html b/packages/genesys-spark-components/src/components/beta/gux-selector-cards/example.html index c333176cf..fa4d861d3 100644 --- a/packages/genesys-spark-components/src/components/beta/gux-selector-cards/example.html +++ b/packages/genesys-spark-components/src/components/beta/gux-selector-cards/example.html @@ -31,3 +31,62 @@

Simple Selector Card Group

+ +

Descriptive Selector Card Group

+ + + + + A label for a sample selector card. Used in Spark WCL. + Badge + + + + + + + A label for a sample selector card. Used in Spark WCL. + Badge + + + + + + + A label for a sample selector card. Used in Spark WCL. + Badge + + + + + + + A label for a sample selector card. Used in Spark WCL. + Badge + + + + + + + A label for a sample selector card. Used in Spark WCL. + Badge + + + + + diff --git a/packages/genesys-spark-components/src/components/beta/gux-selector-cards/gux-selector-card/example.html b/packages/genesys-spark-components/src/components/beta/gux-selector-cards/gux-selector-card/example.html index 270aca45f..eacbfb05b 100644 --- a/packages/genesys-spark-components/src/components/beta/gux-selector-cards/gux-selector-card/example.html +++ b/packages/genesys-spark-components/src/components/beta/gux-selector-cards/gux-selector-card/example.html @@ -15,7 +15,7 @@

Default

value="card-label" /> - A label for a sample selector card. Used in Spark WCL. @@ -34,7 +34,7 @@

Disabled - Unchecked

value="card-label" /> - A second label for a sample selector card. Used in Spark WCL. @@ -73,7 +73,91 @@

Longer label

+

Descriptive - Radio Button

+
+
+

Default

+ + + + A label for a sample selector card. Used in Spark WCL. + Badge + + +
+ +
+

Disabled - Unchecked

+ + + + A label for a sample selector card. Used in Spark WCL. + Badgeß + + +
+
+

Disabled - Checked

+ + + + A label for a sample selector card. Used in Spark WCL. + Badge + + +
+
+
+
+

Longer label

+ + + + A description for a sample selector card. Used in Spark WCL. + Descriptions can span up to 3 lines before being truncated. + + Badge + + +
+