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

[terra-clinical-onset-picker] Fixes screen reader issues #928

Merged
merged 6 commits into from
Jan 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading