From 6aa60e74c74fa1a7f436ffcd43e478553c6d69e4 Mon Sep 17 00:00:00 2001 From: Haz Date: Mon, 7 Sep 2020 20:44:41 -0300 Subject: [PATCH] Replace accessibilityLabel by label on the RadioGroup component --- packages/components/src/radio-group/README.md | 4 ++-- packages/components/src/radio-group/index.js | 11 ++--------- packages/components/src/radio-group/stories/index.js | 6 +++--- packages/components/src/radio/stories/index.js | 2 +- 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/packages/components/src/radio-group/README.md b/packages/components/src/radio-group/README.md index 9354ea281c6e2c..73cffe3b333489 100644 --- a/packages/components/src/radio-group/README.md +++ b/packages/components/src/radio-group/README.md @@ -51,7 +51,7 @@ import { useState } from '@wordpress/element'; const MyControlledRadioRadioGroup = () => { const [ checked, setChecked ] = useState( '25' ); return ( - + 25% 50% 75% @@ -71,7 +71,7 @@ import { useState } from '@wordpress/element'; const MyUncontrolledRadioRadioGroup = () => { return ( - + 25% 50% 75% diff --git a/packages/components/src/radio-group/index.js b/packages/components/src/radio-group/index.js index 11f24605297923..2c024d6c1ce006 100644 --- a/packages/components/src/radio-group/index.js +++ b/packages/components/src/radio-group/index.js @@ -15,14 +15,7 @@ import ButtonGroup from '../button-group'; import RadioContext from '../radio-context'; function RadioGroup( - { - accessibilityLabel, - checked, - defaultChecked, - disabled, - onChange, - ...props - }, + { label, checked, defaultChecked, disabled, onChange, ...props }, ref ) { const radioState = useRadioState( { @@ -42,7 +35,7 @@ function RadioGroup( diff --git a/packages/components/src/radio-group/stories/index.js b/packages/components/src/radio-group/stories/index.js index 5844cd82016b57..88dd726005ad6b 100644 --- a/packages/components/src/radio-group/stories/index.js +++ b/packages/components/src/radio-group/stories/index.js @@ -17,7 +17,7 @@ export const _default = () => { Option 1 @@ -35,7 +35,7 @@ export const disabled = () => { // id is required for server side rendering id="disabled-radiogroup" disabled - accessibilityLabel="options" + label="options" defaultChecked="option2" > Option 1 @@ -54,7 +54,7 @@ const ControlledRadioGroupWithState = () => { diff --git a/packages/components/src/radio/stories/index.js b/packages/components/src/radio/stories/index.js index b64c35ed7ba17f..4caeeadeec2b98 100644 --- a/packages/components/src/radio/stories/index.js +++ b/packages/components/src/radio/stories/index.js @@ -11,7 +11,7 @@ export const _default = () => { /* eslint-disable no-restricted-syntax */ return ( // id is required for server side rendering - + Option 1 Option 2