React 的可访问模态对话框组件
< script src="https://cdnjs.cloudflare.com/ajax/libs/react-modal/3.14.3/react-modal.min.js"" integrity="sha512-MY2jfK3DBnVzdS2V8MXo5lRtr0mNRroUI9hoLVv2/yL3vrJTam3VzASuKQ96fLEpyYIT4a8o7YgtUs5lPjiLVQ==" crossorigin="anonymous" referrerpolicy="no-referrer"> - 在您的 React CDN 应用中使用 <ReactModal> 标签。
您可以在 examples 目录中找到更多示例,可以在本地开发服务器中使用 npm start 或 yarn run start 来运行这些示例。
无法注册已打开的模态实例
在输入组合过程中按 ESC 可以取消输入,但 IME 组合期间模式意外关闭
'ReactModal' 不能用作 JSX 组件。
在应用 left 后,蚂蚁可拖动模态的拖动属性不起作用
打开时阻止滚动到顶部
按 Enter 键关闭按钮会关闭模态对话框,但该事件会附加到打开元素,并重新打开模态对话框
iOS 26 - 覆盖层未全屏
是否可以立即在 DOM 中渲染模态内容?
body 上的 aria-hidden=true 会打破可访问性 <body class="ReactModal__Body--open" aria-hidden="true">
添加对 React 和 Node 18 的支持 (就像在每次 setState 时添加 startTransition() 一样简单)