Skip to content

Commit b7acf67

Browse files
authored
fix(components): disable focus on the post-linkarea host (#6937)
## 📄 Description Remove the possibility to set focus on the `post-linkarea` host. ## 🚀 Demo https://preview-6937--swisspost-design-system-next.netlify.app/?path=/story/1d52b794-768b-464e-90eb-4fd15774aa90--default --- ## 🔮 Design review - [ ] Design review done - [x] No design review needed ## 📝 Checklist - ✅ My code follows the style guidelines of this project - 🛠️ I have performed a self-review of my own code - 📄 I have made corresponding changes to the documentation - ⚠️ My changes generate no new warnings or errors - 🧪 I have added tests that prove my fix is effective or that my feature works - ✔️ New and existing unit tests pass locally with my changes
1 parent b085b9c commit b7acf67

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/forty-llamas-admire.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@swisspost/design-system-components': patch
3+
---
4+
5+
Removed `tabindex="0"` from the `post-linkarea` component.
6+
The link area is mouse-only and should not be focusable, only the button it contains can receive keyboard focus.

packages/components/src/components/post-linkarea/post-linkarea.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export class PostLinkarea {
4646

4747
render() {
4848
return (
49-
<Host data-version={version} onClick={(e: MouseEvent) => this.dispatchClick(e)} tabindex="0">
49+
<Host data-version={version} onClick={(e: MouseEvent) => this.dispatchClick(e)}>
5050
<slot></slot>
5151
</Host>
5252
);

0 commit comments

Comments
 (0)