bug: focus not trapped in modal with collapsible title

オープン
#30,669 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
typescript

調査の方向性

リンクされた StackBlitz の再現を Chromium ベースのブラウザーで実行し、固定タイトルと折りたたみ可能なタイトルのモーダルフローを比較します。ion-modal のフォーカストラップ動作と collapse="condense" ヘッダーの動作を追跡します。完了条件は、折りたたみ可能なタイトルのモーダルを開いた後も含め、どちらの場合も Tab が開いているモーダル内に閉じ込められたままになることです。

索引モデルが issue の本文から書いたものです。

説明

type: bug
Prerequisites
Ionic Framework Version

v8.x

Current Behavior

When using collapse="condense" on an ion-header inside a modal, the focus trapping functionality of the modal stops working, and tabbing results in focus being placed on elements outside the modal.

Once a modal with a collapsible title is opened, it seems like the focus trapping then stops working all together, even for other instances of modal that do not use collapse title.

The bug only happens in Chromium-based browsers.

Expected Behavior

Focus trapping functionality should be maintained even with collapsible titles.

Steps to Reproduce
  1. In a Chromium browser, go to https://stackblitz.com/edit/n35ryw68
  2. Press 'Fixed Title Modal' button to open modal, and press Tab three times to verify that focus cycles between 'Cancel' and 'Confirm' inside the modal.
  3. Close the modal and press 'Collapsible Title Modal' button, then press Tab three times
  4. See that focus is now outside the modal, most likely on the first browser tab
Code Reproduction URL

https://stackblitz.com/edit/n35ryw68

Ionic Info

Stackblitz info:

Ionic:

   Ionic CLI : 5.4.16

Utility:

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

System:

   NodeJS : v20.19.1
   npm    : 10.8.2
   OS     : Linux 5.0
Additional Information

No response

主要言語
TypeScript
スター
52.8k
フォーク
13.3k
平均マージ
3日 1時間
マージ済み PR(30日)
86

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

ionic-team/ionic-framework のほかの issue

ionic-team/ionic-framework の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。