reactjs/react-modal

Focus escapes modal when the last element in the modal is an iframe

開放

#226 建立於 2016年9月19日

 (2 則留言) (2 個反應) (0 位負責人)JavaScript (828 個分叉)batch import
bughelp wanted

倉庫指標

星標
 (7,294 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Summary:

When an iframe is the last element in the modal, focus escapes the modal when using keyboard navigation. This is problematic particularly for screen reader users since the rest of the DOM has aria-hidden set to true. Screen readers are no longer able to access the modal once focus has escaped from it. I used Chrome Version 53.0.2785.116 (64-bit).

Steps to reproduce:

  1. Unzip the modal-test.zip file
  2. Run npm install
  3. Run npm run build
  4. Run node index.js
  5. Navigate to page and tab through until focus escapes the modal (wikipedia has a lot of links so tabbing takes awhile)

Expected behavior:

Focus should be contained within the modal even if an iframe is the last element in the modal.

modal-test.zip

貢獻者指南