From d0b82dacfbb19ca23346bd56137ebd1ea4c9f923 Mon Sep 17 00:00:00 2001 From: Andrea Fercia Date: Mon, 22 Jul 2024 08:45:09 +0200 Subject: [PATCH] Improve the base control help prop documentation. (#63693) * Improve the base control help prop documentation. * Add changelog entry. Co-authored-by: afercia Co-authored-by: tyxla --- packages/components/CHANGELOG.md | 4 ++++ packages/components/src/base-control/README.md | 2 +- packages/components/src/base-control/types.ts | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/components/CHANGELOG.md b/packages/components/CHANGELOG.md index 46e357a008b3f0..ec1736e3adafa9 100644 --- a/packages/components/CHANGELOG.md +++ b/packages/components/CHANGELOG.md @@ -28,6 +28,10 @@ - `Tabs`: Vertical Tabs should be 40px min height. ([#63446](https://github.com/WordPress/gutenberg/pull/63446)). - `ColorPicker`: Use `minimal` variant for `SelectControl` ([#63676](https://github.com/WordPress/gutenberg/pull/63676)). +### Documentation + +- `BaseControl`: Improve the base control help prop documentation. ([#63693](https://github.com/WordPress/gutenberg/pull/63693)). + ## 28.3.0 (2024-07-10) ### Enhancements diff --git a/packages/components/src/base-control/README.md b/packages/components/src/base-control/README.md index bc46629d2b6182..dc3d8c0e29c8e0 100644 --- a/packages/components/src/base-control/README.md +++ b/packages/components/src/base-control/README.md @@ -53,7 +53,7 @@ If true, the label will only be visible to screen readers. ### help -Additional description for the control. The element containing the description will be programmatically associated to the BaseControl by the means of an `aria-describedby` attribute. +Additional description for the control. Only use for meaningful description or instructions for the control. An element containing the description will be programmatically associated to the BaseControl by the means of an `aria-describedby` attribute. - Type: `ReactNode` - Required: No diff --git a/packages/components/src/base-control/types.ts b/packages/components/src/base-control/types.ts index eeb8736cf1b956..07a358d09c14b4 100644 --- a/packages/components/src/base-control/types.ts +++ b/packages/components/src/base-control/types.ts @@ -21,7 +21,7 @@ export type BaseControlProps = { /** * Additional description for the control. * - * The element containing the description will be programmatically associated to the BaseControl by the means of an `aria-describedby` attribute. + * Only use for meaningful description or instructions for the control. An element containing the description will be programmatically associated to the BaseControl by the means of an `aria-describedby` attribute. */ help?: ReactNode; /**