ionic-team / ionic-team/ionic-framework

bug: navigating to new view in ion-nav in a modal causes browser to move focus to body

未关闭
#27,465 4 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看
package: core type: bug
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 15 小时
30 天内合并 PR
51

描述

### Prerequisites

- [X] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#creating-an-issue).
- [X] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [X] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v6.x

### Current Behavior

Hi,

I have a IonNav in a IonModal and I am trying to get better accessibility on my app.
But I'm facing an issue, when user navigates through a new page in my IonNav, focus is not trap anymore in modal and continue in background.

### Expected Behavior

The expected behavior it to trap the focus in modal when navigating through IonNav pages.

### Steps to Reproduce

1. Build a IonNav in a IonModal ;
2. Make sure you have two or more pages you can navigate through ;
3. On navigating to your second, third or more, page using Tab, you can see that your focus continue on your main page (besides your modal).

### Code Reproduction URL

_No response_

### Ionic Info

Ionic:

Ionic CLI : 6.20.8 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.3.2
@angular-devkit/build-angular : 13.3.11
@angular-devkit/schematics : 14.2.2
@angular/cli : 13.1.4
@ionic/angular-toolkit : 7.0.0

Capacitor:

Capacitor CLI : not installed
@capacitor/android : not installed
@capacitor/core : not installed
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : not installed globally

System:

NodeJS : v16.19.1 (/Users/monchaninbenoit/.nvm/versions/node/v16.19.1/bin/node)
npm : 8.19.3
OS : macOS

### Additional Information

Don't worry to ask me for something !

Sorry for my bad english

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。