Semantic-Org/Semantic-UI-React

Modal: implement focus trap

开放

#2,278 创建于 2017年11月1日

 (8 条评论) (10 个反应) (0 位负责人)JavaScript (4,065 个派生)batch import
enhancementhelp wantedstale

仓库指标

星标
 (13,136 个星标)
PR 合并指标
 (PR 指标待抓取)

描述

Modal should not let focus leave the components inside the dialog. Also it should autofocus the first component in the dialog (if no autofocus was specified).

More on Modals and keyboard traps: https://developers.google.com/web/fundamentals/accessibility/focus/using-tabindex

Steps

  1. Open any modal on the example page: https://react.semantic-ui.com/modules/modal
  2. Press tab multiple times

Expected Result

Focus should never enter the dimmed components below

Actual Result

Focus does enter the dimmed components below

Version

Current Tested in Chrome Version 61.0.3163.100 (Official Build) (64-bit)

Testcase

https://react.semantic-ui.com/modules/modal

贡献者指南