From 73f94705dc583e968114e5a09e85979448f3412b Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Tue, 7 Jun 2022 16:02:21 +0200 Subject: chore(cards): use post title as link label --- src/components/atoms/buttons/button-link.stories.tsx | 13 +++++++++++++ src/components/atoms/buttons/button-link.tsx | 4 ++++ src/components/atoms/buttons/buttons.module.scss | 2 ++ 3 files changed, 19 insertions(+) (limited to 'src/components/atoms') diff --git a/src/components/atoms/buttons/button-link.stories.tsx b/src/components/atoms/buttons/button-link.stories.tsx index d06aff3..22d13f6 100644 --- a/src/components/atoms/buttons/button-link.stories.tsx +++ b/src/components/atoms/buttons/button-link.stories.tsx @@ -24,6 +24,19 @@ export default { required: false, }, }, + 'aria-labelledby': { + control: { + type: null, + }, + description: 'One or more ids that refer to an accessible label.', + table: { + category: 'Accessibility', + }, + type: { + name: 'string', + required: false, + }, + }, children: { control: { type: 'text', diff --git a/src/components/atoms/buttons/button-link.tsx b/src/components/atoms/buttons/button-link.tsx index 64e0afd..989f737 100644 --- a/src/components/atoms/buttons/button-link.tsx +++ b/src/components/atoms/buttons/button-link.tsx @@ -7,6 +7,10 @@ export type ButtonLinkProps = { * ButtonLink accessible label. */ 'aria-label'?: string; + /** + * One or more ids that refer to the accessible label. + */ + 'aria-labelledby'?: string; /** * The button link body. */ diff --git a/src/components/atoms/buttons/buttons.module.scss b/src/components/atoms/buttons/buttons.module.scss index 2444bb1..b702544 100644 --- a/src/components/atoms/buttons/buttons.module.scss +++ b/src/components/atoms/buttons/buttons.module.scss @@ -21,6 +21,8 @@ &--square, &--circle { + min-width: fit-content; + min-height: fit-content; padding: var(--spacing-xs); aspect-ratio: 1 / 1; } -- cgit v1.2.3