ionic-team / ionic-team/ionic-framework
bug: focus is not trapped when presenting an overlay from another overlay
- 主要语言
- 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
- [ ] v4.x
- [ ] v5.x
- [X] v6.x
- [ ] Nightly
### Current Behavior
When an alert is opened from an action sheet, it doesn't immediately trap the focus within the alert. Instead, the focus cycles through the underlying page elements up until it reaches the alert buttons. Once it has reached the alert button, the focus remains properly trapped.
### Expected Behavior
The focus should be immediately trapped within the alert, just like it would when opening the alert from a button.
### Steps to Reproduce
- Open action sheet by clicking ellipsis icon in the top-right
- Click action sheet button to open an alert
- Hit "Tab" key
### Code Reproduction URL
https://github.com/jeroenkroese/IonicAlertFocusBug
### Ionic Info
[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package'
Require stack:
- /usr/local/lib/node_modules/@ionic/cli/lib/project/index.js
- /usr/local/lib/node_modules/@ionic/cli/lib/index.js
- /usr/local/lib/node_modules/@ionic/cli/index.js
- /usr/local/lib/node_modules/@ionic/cli/bin/ionic
[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package'
Require stack:
- /usr/local/lib/node_modules/@ionic/cli/lib/project/index.js
- /usr/local/lib/node_modules/@ionic/cli/lib/index.js
- /usr/local/lib/node_modules/@ionic/cli/index.js
- /usr/local/lib/node_modules/@ionic/cli/bin/ionic
Ionic:
Ionic CLI : 6.20.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.2.8
@angular-devkit/build-angular : 14.2.3
@angular-devkit/schematics : 14.2.3
@angular/cli : 14.2.3
@ionic/angular-toolkit : 6.1.0
Capacitor:
Capacitor CLI : 4.3.0
@capacitor/android : not installed
@capacitor/core : 4.3.0
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : 1.7.0
System:
NodeJS : v16.16.0 (/usr/local/Cellar/node@16/16.16.0/bin/node)
npm : 8.18.0
OS : macOS Monterey
### Additional Information
_No response_
贡献指南
调研方向
Start with the linked Code Reproduction URL and reproduce the Tab sequence after opening an alert from an action sheet. Trace the overlay focus behavior involved in that transition; done means focus is immediately confined to the alert, matching the behavior when it is opened from a button.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- accessibility, frontend
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 35/100