From ac266d03b2ccb1a1af0b88b18a8b1baff3a1afc1 Mon Sep 17 00:00:00 2001 From: Myrta Sakellariou Date: Mon, 16 Dec 2024 14:39:40 +0100 Subject: [PATCH 1/5] chore(components): disable focus when accordion item collapsed --- .../src/components/post-accordion-item/post-accordion-item.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/src/components/post-accordion-item/post-accordion-item.tsx b/packages/components/src/components/post-accordion-item/post-accordion-item.tsx index 235d9ce6e1..7c9cd9db1b 100644 --- a/packages/components/src/components/post-accordion-item/post-accordion-item.tsx +++ b/packages/components/src/components/post-accordion-item/post-accordion-item.tsx @@ -112,6 +112,7 @@ export class PostAccordionItem { id={`${this.id}--collapse`} collapsed={this.collapsed} ref={el => (this.collapsible = el)} + tabIndex={this.collapsed ? -1 : undefined} >
From 96f417e22bb7c2704e44bd816dd5c4206ae16455 Mon Sep 17 00:00:00 2001 From: Myrta Sakellariou Date: Mon, 16 Dec 2024 14:48:57 +0100 Subject: [PATCH 2/5] revert accordion item --- .../src/components/post-accordion-item/post-accordion-item.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/components/src/components/post-accordion-item/post-accordion-item.tsx b/packages/components/src/components/post-accordion-item/post-accordion-item.tsx index 7c9cd9db1b..235d9ce6e1 100644 --- a/packages/components/src/components/post-accordion-item/post-accordion-item.tsx +++ b/packages/components/src/components/post-accordion-item/post-accordion-item.tsx @@ -112,7 +112,6 @@ export class PostAccordionItem { id={`${this.id}--collapse`} collapsed={this.collapsed} ref={el => (this.collapsible = el)} - tabIndex={this.collapsed ? -1 : undefined} >
From 87cf534b66d1a1237d60d6f5bad694212799cac5 Mon Sep 17 00:00:00 2001 From: Myrta Sakellariou Date: Mon, 16 Dec 2024 14:50:23 +0100 Subject: [PATCH 3/5] move logic to collapsible --- .../src/components/post-collapsible/post-collapsible.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/components/post-collapsible/post-collapsible.tsx b/packages/components/src/components/post-collapsible/post-collapsible.tsx index e44c2d25c2..f99c243af3 100644 --- a/packages/components/src/components/post-collapsible/post-collapsible.tsx +++ b/packages/components/src/components/post-collapsible/post-collapsible.tsx @@ -96,7 +96,7 @@ export class PostCollapsible { render() { return ( - + ); From 721d8d6b6209cd6eb740b4ac08173e30853a2c3f Mon Sep 17 00:00:00 2001 From: Myrta Sakellariou Date: Mon, 16 Dec 2024 15:55:09 +0100 Subject: [PATCH 4/5] add changeset --- .changeset/wicked-scissors-buy.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/wicked-scissors-buy.md diff --git a/.changeset/wicked-scissors-buy.md b/.changeset/wicked-scissors-buy.md new file mode 100644 index 0000000000..79950fb357 --- /dev/null +++ b/.changeset/wicked-scissors-buy.md @@ -0,0 +1,5 @@ +--- +'@swisspost/design-system-components': patch +--- + +Removed focus from collapsible when in collapsed state. From 9bc79b91d048a8dc5b91b9da8994b6af5627a294 Mon Sep 17 00:00:00 2001 From: Myrta Sakellariou <66249294+myrta2302@users.noreply.github.com> Date: Thu, 19 Dec 2024 14:10:23 +0100 Subject: [PATCH 5/5] Update packages/components/src/components/post-collapsible/post-collapsible.tsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Oliver Schürch --- .../src/components/post-collapsible/post-collapsible.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/components/src/components/post-collapsible/post-collapsible.tsx b/packages/components/src/components/post-collapsible/post-collapsible.tsx index f99c243af3..424fc8ebbb 100644 --- a/packages/components/src/components/post-collapsible/post-collapsible.tsx +++ b/packages/components/src/components/post-collapsible/post-collapsible.tsx @@ -96,7 +96,7 @@ export class PostCollapsible { render() { return ( - + );