diff --git a/packages/components/src/components/span/InternalUnderlinedAccessKey.tsx b/packages/components/src/components/span/InternalUnderlinedAccessKey.tsx index ec4bfbe0e3..b54115fa7b 100644 --- a/packages/components/src/components/span/InternalUnderlinedAccessKey.tsx +++ b/packages/components/src/components/span/InternalUnderlinedAccessKey.tsx @@ -18,8 +18,8 @@ export const InternalUnderlinedAccessKey = ({ label, accessKey }: Props) => { return ( {first} - {accessKey} - {rest.join(accessKey)} + {rest.length ? {accessKey} : null} + {rest.length ? rest.join(accessKey) : null} ); }; diff --git a/packages/samples/react/src/components/button/access-key.tsx b/packages/samples/react/src/components/button/access-key.tsx index 82be844edf..87363b0c6e 100644 --- a/packages/samples/react/src/components/button/access-key.tsx +++ b/packages/samples/react/src/components/button/access-key.tsx @@ -5,6 +5,7 @@ export const ButtonAccessKey: FC = () => (
+