From f44c62eb5daeffc73fb7bca870f4dddbff5c94ca Mon Sep 17 00:00:00 2001 From: Sugan G Date: Fri, 22 Dec 2023 13:15:07 +0530 Subject: [PATCH 1/6] onset a11y VO fix --- .../terra-clinical-onset-picker/package.json | 2 +- .../src/OnsetPicker.jsx | 5 +- .../tests/jest/OnsetPicker.test.jsx | 16 -- .../__snapshots__/OnsetPicker.test.jsx.snap | 197 ++---------------- 4 files changed, 19 insertions(+), 201 deletions(-) diff --git a/packages/terra-clinical-onset-picker/package.json b/packages/terra-clinical-onset-picker/package.json index 2092ebdf3..bb0e70192 100644 --- a/packages/terra-clinical-onset-picker/package.json +++ b/packages/terra-clinical-onset-picker/package.json @@ -37,7 +37,7 @@ "terra-breakpoints": "^2.0.0", "terra-date-picker": "^4.73.1", "terra-form-field": "^4.25.0", - "terra-form-fieldset": "2.64.0", + "terra-form-fieldset": "^2.64.0", "terra-form-input": "4.15.0", "terra-form-select": "^6.40.0", "terra-theme-context": "^1.0.0" diff --git a/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx b/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx index 3c6956b78..c5f2d2fc9 100644 --- a/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx +++ b/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx @@ -518,7 +518,7 @@ class OnsetPicker extends React.Component { return (
-
+
{/* Precision */} {OnsetUtils.allowedPrecisions(intl, this.props.precisionSet) .map(precisionEntry => )} @@ -538,7 +539,7 @@ class OnsetPicker extends React.Component { {granularitySelect} {(this.state.precision !== PrecisionOptions.UNKNOWN) && ( -
+
{ageInput} {ageUnitSelect} {monthSelect} diff --git a/packages/terra-clinical-onset-picker/tests/jest/OnsetPicker.test.jsx b/packages/terra-clinical-onset-picker/tests/jest/OnsetPicker.test.jsx index 70ed2033c..ee09e04f3 100644 --- a/packages/terra-clinical-onset-picker/tests/jest/OnsetPicker.test.jsx +++ b/packages/terra-clinical-onset-picker/tests/jest/OnsetPicker.test.jsx @@ -152,22 +152,6 @@ it('should render Clinical Onset picker with the correct label for date', () => expect(wrapper).toMatchSnapshot(); }); -it('should render Clinical Onset picker with the aria-live region', () => { - const wrapper = shallowWithIntl( - , - ).dive(); - - expect(wrapper.find('#dynamic_content').prop('aria-live')).toEqual('polite'); - expect(wrapper).toMatchSnapshot(); -}); - it('correctly applies the theme context className', () => { const tabs = render( diff --git a/packages/terra-clinical-onset-picker/tests/jest/__snapshots__/OnsetPicker.test.jsx.snap b/packages/terra-clinical-onset-picker/tests/jest/__snapshots__/OnsetPicker.test.jsx.snap index ac0f74f76..ae43b8123 100644 --- a/packages/terra-clinical-onset-picker/tests/jest/__snapshots__/OnsetPicker.test.jsx.snap +++ b/packages/terra-clinical-onset-picker/tests/jest/__snapshots__/OnsetPicker.test.jsx.snap @@ -201,7 +201,6 @@ exports[`correctly applies the theme context className 1`] = `
@@ -209,176 +208,6 @@ exports[`correctly applies the theme context className 1`] = `
`; -exports[`should render Clinical Onset picker with the aria-live region 1`] = ` -
-
- - - - -
- - } - help={null} - hideRequired={false} - inputAttrs={ - Object { - "max": 6, - "min": 0, - "step": 1, - "type": "number", - } - } - inputId="test-age-input" - isIncomplete={false} - isInline={false} - isInvalid={false} - isLabelHidden={false} - label="Terra.onsetPicker.age" - labelAttrs={ - Object { - "id": "test-age-input-label", - } - } - onChange={[Function]} - required={false} - showOptional={false} - /> - - -
-
-
-`; - exports[`should render Clinical Onset picker with the correct label for date 1`] = `
@@ -1445,7 +1282,6 @@ exports[`should render only the supplied precisions 1`] = `
@@ -1654,7 +1490,6 @@ exports[`should render the same when onChange function is supplied 1`] = `
@@ -1861,7 +1696,6 @@ exports[`should render with age inputs filled in when supplied 1`] = `
Date: Fri, 22 Dec 2023 13:28:40 +0530 Subject: [PATCH 2/6] updated changelog --- packages/terra-clinical-onset-picker/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/terra-clinical-onset-picker/CHANGELOG.md b/packages/terra-clinical-onset-picker/CHANGELOG.md index f262b61b8..aa4d78213 100644 --- a/packages/terra-clinical-onset-picker/CHANGELOG.md +++ b/packages/terra-clinical-onset-picker/CHANGELOG.md @@ -5,6 +5,9 @@ * Added * Added required prop to mark fields as required based on granularity. +* Fixed + * Fixed screen reader issues related to repetitive announcements. + ## 4.36.0 - (September 21, 2023) * Added From 5fe3d493bc4005096bd85069ba93ecdac77cc919 Mon Sep 17 00:00:00 2001 From: Sugan G Date: Fri, 22 Dec 2023 16:42:14 +0530 Subject: [PATCH 3/6] removed help --- packages/terra-clinical-onset-picker/package.json | 2 +- packages/terra-clinical-onset-picker/src/OnsetPicker.jsx | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/terra-clinical-onset-picker/package.json b/packages/terra-clinical-onset-picker/package.json index bb0e70192..2092ebdf3 100644 --- a/packages/terra-clinical-onset-picker/package.json +++ b/packages/terra-clinical-onset-picker/package.json @@ -37,7 +37,7 @@ "terra-breakpoints": "^2.0.0", "terra-date-picker": "^4.73.1", "terra-form-field": "^4.25.0", - "terra-form-fieldset": "^2.64.0", + "terra-form-fieldset": "2.64.0", "terra-form-input": "4.15.0", "terra-form-select": "^6.40.0", "terra-theme-context": "^1.0.0" diff --git a/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx b/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx index c5f2d2fc9..0f3f23350 100644 --- a/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx +++ b/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx @@ -530,7 +530,6 @@ class OnsetPicker extends React.Component { onChange={this.changePrecision} placeholder={intl.formatMessage({ id: 'Terra.onsetPicker.precision' })} selectId={`${this.props.id}-precision-select`} - help={legend} > {OnsetUtils.allowedPrecisions(intl, this.props.precisionSet) .map(precisionEntry => )} From a71ad1bd2e29bcdbe40db8816df8b1177199171b Mon Sep 17 00:00:00 2001 From: Sugan G Date: Tue, 2 Jan 2024 16:44:32 +0530 Subject: [PATCH 4/6] revert legend attr --- .../src/OnsetPicker.jsx | 2 +- .../__snapshots__/OnsetPicker.test.jsx.snap | 18 +++--------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx b/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx index 0f3f23350..d8adfae5d 100644 --- a/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx +++ b/packages/terra-clinical-onset-picker/src/OnsetPicker.jsx @@ -518,7 +518,7 @@ class OnsetPicker extends React.Component { return (
-
+
{/* Precision */} Date: Thu, 4 Jan 2024 13:20:50 +0530 Subject: [PATCH 5/6] changelog --- packages/terra-clinical-onset-picker/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/terra-clinical-onset-picker/CHANGELOG.md b/packages/terra-clinical-onset-picker/CHANGELOG.md index aa4d78213..0379cc98a 100644 --- a/packages/terra-clinical-onset-picker/CHANGELOG.md +++ b/packages/terra-clinical-onset-picker/CHANGELOG.md @@ -6,7 +6,7 @@ * Added required prop to mark fields as required based on granularity. * Fixed - * Fixed screen reader issues related to repetitive announcements. + * Fixed screen reader issues related to repetitive announcements ## 4.36.0 - (September 21, 2023) From 141629cd9f4d2620f5018e04fcf2e01bca20e4bf Mon Sep 17 00:00:00 2001 From: Sugan G Date: Thu, 4 Jan 2024 13:29:19 +0530 Subject: [PATCH 6/6] jest update --- .../terra-clinical-onset-picker/CHANGELOG.md | 2 +- .../__snapshots__/OnsetPicker.test.jsx.snap | 75 ------------------- 2 files changed, 1 insertion(+), 76 deletions(-) diff --git a/packages/terra-clinical-onset-picker/CHANGELOG.md b/packages/terra-clinical-onset-picker/CHANGELOG.md index 0379cc98a..aa4d78213 100644 --- a/packages/terra-clinical-onset-picker/CHANGELOG.md +++ b/packages/terra-clinical-onset-picker/CHANGELOG.md @@ -6,7 +6,7 @@ * Added required prop to mark fields as required based on granularity. * Fixed - * Fixed screen reader issues related to repetitive announcements + * Fixed screen reader issues related to repetitive announcements. ## 4.36.0 - (September 21, 2023) diff --git a/packages/terra-clinical-onset-picker/tests/jest/__snapshots__/OnsetPicker.test.jsx.snap b/packages/terra-clinical-onset-picker/tests/jest/__snapshots__/OnsetPicker.test.jsx.snap index 874369948..5186ea132 100644 --- a/packages/terra-clinical-onset-picker/tests/jest/__snapshots__/OnsetPicker.test.jsx.snap +++ b/packages/terra-clinical-onset-picker/tests/jest/__snapshots__/OnsetPicker.test.jsx.snap @@ -80,7 +80,6 @@ exports[`correctly applies the theme context className 1`] = `
-
-
-
-
-
@@ -1149,7 +1124,6 @@ exports[`should render only the supplied precisions 1`] = `
-
-
-
-
-
-
-
@@ -1912,7 +1852,6 @@ exports[`should render with non default inputs when supplied 1`] = `
-
-
-