mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
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 <maria.hutt@outsystems.com>
This commit is contained in:
@@ -514,6 +514,7 @@ export class Accordion implements ComponentInterface {
|
||||
|
||||
'accordion-animated': this.shouldAnimate(),
|
||||
}}
|
||||
tabindex={disabled ? '-1' : undefined}
|
||||
>
|
||||
<div
|
||||
onClick={() => this.toggleExpanded()}
|
||||
|
||||
Reference in New Issue
Block a user