Skip to content

Commit

Permalink
Removing aria-live, updating test and changelog (cerner#3687)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenBoersma authored Nov 21, 2022
1 parent c3d90ca commit 65b9e71
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 3 additions & 0 deletions packages/terra-form-field/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
* Set the isLabelHidden prop to be private
* Set an asterisk denoting required field to be aria-hidden

* Removed
* Removed aria-live attribute from error message.

## 4.20.5 - (July 5, 2022)

* Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/terra-form-field/src/Field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ const Field = (props) => {
<div style={customStyles} {...customProps} className={fieldClasses}>
{labelGroup}
{content}
{isInvalid && error && <div aria-live="assertive" id={htmlFor ? `${htmlFor}-error` : undefined} className={cx('error-text')}>{error}</div>}
{isInvalid && error && <div id={htmlFor ? `${htmlFor}-error` : undefined} className={cx('error-text')}>{error}</div>}
{help && <div id={htmlFor ? `${htmlFor}-help` : undefined} className={cx('help-text')}>{help}</div>}
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,6 @@ exports[`should render a field in error 1`] = `
</label>
</div>
<div
aria-live="assertive"
className="error-text"
id="test-error"
>
Expand Down Expand Up @@ -668,7 +667,6 @@ exports[`should render a field with a hidden label in error 1`] = `
</label>
</div>
<div
aria-live="assertive"
className="error-text"
id="test-error"
>
Expand Down Expand Up @@ -827,7 +825,6 @@ exports[`should render a required field in error 1`] = `
</label>
</div>
<div
aria-live="assertive"
className="error-text"
id="test-error"
>
Expand Down Expand Up @@ -1266,7 +1263,6 @@ exports[`should render a required field with a hidden label in error 1`] = `
</label>
</div>
<div
aria-live="assertive"
className="error-text"
id="test-error"
>
Expand Down Expand Up @@ -2349,7 +2345,6 @@ exports[`should render an optional field in error 1`] = `
</label>
</div>
<div
aria-live="assertive"
className="error-text"
id="test-error"
>
Expand Down

0 comments on commit 65b9e71

Please sign in to comment.