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

[Terra-Form-Radio] Update Prop description of form-radio #3901

Merged
merged 5 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
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.
For example: When we have radio feilds 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 meaningfull Text is provided for `labelText` prop.
saket2403 marked this conversation as resolved.
Show resolved Hide resolved
* Whether the label is hidden.
*/
isLabelHidden: PropTypes.bool,
Expand Down
Loading