Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

Commit

Permalink
[terra-clinical-onset-picker] Fixes screen reader issues (#928)
Browse files Browse the repository at this point in the history
Co-authored-by: Sugan G <[email protected]>
  • Loading branch information
sugan2416 and Sugan G authored Jan 4, 2024
1 parent 3fbfa21 commit e9094a0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 271 deletions.
3 changes: 3 additions & 0 deletions packages/terra-clinical-onset-picker/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/terra-clinical-onset-picker/src/OnsetPicker.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ class OnsetPicker extends React.Component {
{granularitySelect}

{(this.state.precision !== PrecisionOptions.UNKNOWN) && (
<div id="dynamic_content" aria-live="polite">
<div id="dynamic_content">
{ageInput}
{ageUnitSelect}
{monthSelect}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<OnsetPicker
ageUnit="years"
birthdate="2011-08-16"
granularity="age"
id="test"
precision="before"
onsetDate="2014-08-16"
/>,
).dive();

expect(wrapper.find('#dynamic_content').prop('aria-live')).toEqual('polite');
expect(wrapper).toMatchSnapshot();
});

it('correctly applies the theme context className', () => {
const tabs = render(
<ThemeContextProvider theme={{ className: 'orion-fusion-theme' }}>
Expand Down
Loading

0 comments on commit e9094a0

Please sign in to comment.