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

Commit

Permalink
[Terra-Form-Radio] Update Prop description of form-radio (#3901)
Browse files Browse the repository at this point in the history
Co-authored-by: SM051274 <sm051274@cerner.net>
Co-authored-by: Saket Bajaj <42207428+saket2403@users.noreply.github.com>
  • Loading branch information
3 people authored Sep 7, 2023
1 parent 8782c53 commit e9aaa7e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
4 changes: 3 additions & 1 deletion packages/terra-core-docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Changelog

## Unreleased

* Added
* Added drag and drop example for `terra-list`.
* Added instruction note for `terra-form-radio` label hidden example

* Updated
* Updated `terra-scroll` to add realistic examples.
* Updated `terra-scroll` to add realistic examples.
* Updated all paginator examples to use meaningful titles.
* Updated testing recommendations to use `jest.spyOn` instead of `jest.mock`.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
import React from 'react';
import Radio from 'terra-form-radio';

const hiddenLabelRadioExample = () => (<Radio id="hidden-radio" labelText="can you see me?" isLabelHidden />);
const hiddenLabelRadioExample = () => (
<div>
<p>
<b>Note: </b>
Radio button should always have label to ensures that people with visual or cognitive disabilities will recognize radio buttons and understand what information to provide to fill in the fields.
<br />
For example: When we have radio fields for selection of account types, authors may feel that just providing programmatically determined names of the fields will be sufficient to identify them. However, even if all the fields have programmatically determined names, a text label must also identify the set of fields as a account type.
</p>
<Radio id="hidden-radio" labelText="can you see me?" isLabelHidden />
</div>
);

export default hiddenLabelRadioExample;
3 changes: 3 additions & 0 deletions packages/terra-form-radio/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Changed
* Updated prop description for `isLabelHidden` prop.

## 4.41.0 - (August 25, 2023)

* Changed
Expand Down
3 changes: 3 additions & 0 deletions packages/terra-form-radio/src/Radio.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ const propTypes = {
*/
isInline: PropTypes.bool,
/**
* ![IMPORTANT](https://badgen.net/badge/UX/Accessibility/blue)
* Radio button should always have visible label to meet WCAG 3.3.2 success criterion.
* When set to true, ensure meaningful Text is provided for `labelText` prop.
* Whether the label is hidden.
*/
isLabelHidden: PropTypes.bool,
Expand Down

0 comments on commit e9aaa7e

Please sign in to comment.