From 0e76a69370083702568825c29d63cf257d6b88f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Louren=C3=A7o?= Date: Thu, 5 Mar 2026 18:45:32 +0000 Subject: [PATCH] fix(accordion): update tabindex based on disabled state (#30986) Issue number: resolves internal --------- ## What is the current behavior? When an accordion item was set as disabled, it was still possible to focus using keyboard navigation. ## What is the new behavior? When an accordion item is disabled, `tabindex` is set as -1 to stop being focusable using the keyboard navigation. ## Does this introduce a breaking change? - [ ] Yes - [ ] No ## Other information [preview](https://ionic-framework-qznd9tqne-ionic1.vercel.app/src/components/accordion-group/test/states/) --------- Co-authored-by: Maria Hutt --- core/src/components/accordion/accordion.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/components/accordion/accordion.tsx b/core/src/components/accordion/accordion.tsx index 6facef87a4..2d4bfc452b 100644 --- a/core/src/components/accordion/accordion.tsx +++ b/core/src/components/accordion/accordion.tsx @@ -514,6 +514,7 @@ export class Accordion implements ComponentInterface { 'accordion-animated': this.shouldAnimate(), }} + tabindex={disabled ? '-1' : undefined} >
this.toggleExpanded()}