diff --git a/src/components/decimal/decimal.stories.mdx b/src/components/decimal/decimal.stories.mdx
index 663139b474..f00d766221 100644
--- a/src/components/decimal/decimal.stories.mdx
+++ b/src/components/decimal/decimal.stories.mdx
@@ -105,6 +105,12 @@ import Decimal from "carbon-react/lib/components/decimal";
+### With inputHint
+
+
+
### With labelHelp
+### with inputHint
+
+When the `inputHint` prop is passed, please use a full stop `.` at the end. This forces a pause
+before any other announcements, this well help screen reader users understand the hint fully.
+
+
+
### With labelHelp
+### with inputHint
+
+When the `inputHint` prop is passed, please use a full stop `.` at the end. This forces a pause
+before any other announcements, this well help screen reader users understand the hint fully.
+
+
+
### With labelHelp
+### With inputHint
+
+When the `inputHint` prop is passed, please use a full stop `.` at the end. This forces a pause
+before any other announcements, this well help screen reader users understand the hint fully.
+
+
+
+
+
### With labelHelp
diff --git a/src/components/textarea/textarea.stories.tsx b/src/components/textarea/textarea.stories.tsx
index bb3b65d3d9..6fd243443a 100644
--- a/src/components/textarea/textarea.stories.tsx
+++ b/src/components/textarea/textarea.stories.tsx
@@ -122,6 +122,10 @@ export const MaxWidthStory: ComponentStory = () => {
return ;
};
+export const InputHintStory: ComponentStory = () => {
+ return ;
+};
+
export const LabelHelpStory: ComponentStory = () => {
return ;
};
@@ -231,11 +235,13 @@ export const NewDesignValidationStory: ComponentStory = () => {
>
+### With inputHint
+
+When the `inputHint` prop is passed, please use a full stop `.` at the end. This forces a pause
+before any other announcements, this well help screen reader users understand the hint fully.
+
+
+
+
+
### With labelHelp
diff --git a/src/components/textbox/textbox.stories.tsx b/src/components/textbox/textbox.stories.tsx
index 74ce1d4b80..b6693336e6 100644
--- a/src/components/textbox/textbox.stories.tsx
+++ b/src/components/textbox/textbox.stories.tsx
@@ -153,6 +153,16 @@ export const WithFieldHelp: ComponentStory = () => {
return ;
};
+export const WithInputHint: ComponentStory = () => {
+ return (
+
+ );
+};
+
export const WithLabelHelp: ComponentStory = () => {
return (
= () => {
m={4}
label={`${size} - ${validationType}`}
defaultValue="Textbox"
- labelHelp="Hint text (optional)"
+ inputHint="Hint text (optional)."
size={size}
{...{ [validationType]: "Message" }}
/>
@@ -280,7 +290,7 @@ export const NewDesignsValidation: ComponentStory = () => {
label={`readOnly - ${size} - ${validationType}`}
defaultValue="Textbox"
size={size}
- labelHelp="Hint text (optional)"
+ inputHint="Hint text (optional)."
readOnly
{...{ [validationType]: "Message" }}
/>
diff --git a/src/components/textbox/textbox.style.ts b/src/components/textbox/textbox.style.ts
index c9a544b518..10c9ccfe08 100644
--- a/src/components/textbox/textbox.style.ts
+++ b/src/components/textbox/textbox.style.ts
@@ -15,24 +15,15 @@ const ErrorBorder = styled.span`
`}
`;
-const StyledInputHint = styled.p`
+const StyledHintText = styled.div`
::after {
content: " ";
}
- display: block;
- flex: 1;
- margin-top: -3px;
- margin-bottom: 8px;
- color: var(--colorsUtilityYin055);
- white-space: pre-wrap;
-`;
-
-const StyledHintText = styled.div`
margin-top: 0px;
margin-bottom: 8px;
color: var(--colorsUtilityYin055);
font-size: 14px;
`;
-export { StyledHintText, ErrorBorder, StyledInputHint };
+export { StyledHintText, ErrorBorder };