You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
If you have an ion-accordion with readonly="true", tab to it, and press Enter, the accordion will open. This does not occur if readonly is set on the parent ion-accordion-group.
Expected Behavior
Readonly accordions should not be interactable, even with keyboard controls.
…28865)
Issue number: resolves#28344
---------
<!-- Please do not submit updates to dependencies unless it fixes an
issue. -->
<!-- Please try to limit your pull request to one type (bugfix, feature,
etc). Submit multiple pull requests if needed. -->
## What is the current behavior?
<!-- Please describe the current behavior that you are modifying. -->
When an Accordion is inside an Accordion Group, and the Accordion Group
is enabled and not readonly but the Accordion is disabled and/or
readonly, it is possible to navigate to the accordion and open it using
the keyboard. This should not be allowed, just like opening it on click
is not allowed.
## What is the new behavior?
<!-- Please describe the behavior or changes that are being added by
this PR. -->
- A disabled Accordion inside an Accordion Group may not be opened via
the keyboard.
- A readonly Accordion inside an Accordion Group may not be opened via
the keyboard.
## Does this introduce a breaking change?
- [ ] Yes
- [x] No
<!--
If this introduces a breaking change:
1. Describe the impact and migration path for existing applications
below.
2. Update the BREAKING.md file with the breaking change.
3. Add "BREAKING CHANGE: [...]" to the commit description when merging.
See
https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer
for more information.
-->
## Other information
<!-- Any other information that is important to this PR such as
screenshots of how the component looks before and after the change. -->
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
If you have an
ion-accordion
withreadonly="true"
, tab to it, and press Enter, the accordion will open. This does not occur ifreadonly
is set on the parention-accordion-group
.Expected Behavior
Readonly accordions should not be interactable, even with keyboard controls.
Steps to Reproduce
Code Reproduction URL
https://ionicframework.com/docs/api/accordion#individual-accordion-1
Ionic Info
N/A (reproducible from v7 docs)
Additional Information
ion-accordion-group
doesn't exhibit this behavior because of this piece:ionic-framework/core/src/components/accordion-group/accordion-group.tsx
Lines 208 to 210 in f14a59c
Fixing this in
ion-accordion
should hopefully be as simple asreturn
ing early ifreadonly
is set here:ionic-framework/core/src/components/accordion/accordion.tsx
Line 384 in f14a59c
The text was updated successfully, but these errors were encountered: