From 241e4cb53d941db8e74b36683f0ab35100ac22f6 Mon Sep 17 00:00:00 2001 From: Philipp Ahrendt Date: Tue, 17 Dec 2024 19:11:21 +0100 Subject: [PATCH] Clickable tags use HMTL button Tags that open modals or trigger other actions need to be accessible for keyboard and assistive technologies. --- .../changelog/accessible_clickable_tags.yaml | 2 + scm-ui/ui-components/src/Tag.tsx | 62 ++++++++++++------- .../src/__snapshots__/storyshots.test.ts.snap | 15 +++-- 3 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 gradle/changelog/accessible_clickable_tags.yaml diff --git a/gradle/changelog/accessible_clickable_tags.yaml b/gradle/changelog/accessible_clickable_tags.yaml new file mode 100644 index 0000000000..284aef1998 --- /dev/null +++ b/gradle/changelog/accessible_clickable_tags.yaml @@ -0,0 +1,2 @@ +- type: changed + description: Clickable tags are based on the HTML button. diff --git a/scm-ui/ui-components/src/Tag.tsx b/scm-ui/ui-components/src/Tag.tsx index 908606efef..43b7808e41 100644 --- a/scm-ui/ui-components/src/Tag.tsx +++ b/scm-ui/ui-components/src/Tag.tsx @@ -45,7 +45,7 @@ const Tag: FC = ({ title, onClick, onRemove, - children + children, }) => { const [t] = useTranslation("commons"); @@ -53,7 +53,7 @@ const Tag: FC = ({ if (icon) { showIcon = ( <> - +