Semantic-Org/Semantic-UI-React

Modal: implement focus trap

Open

#2.278 aberto em 1 de nov. de 2017

Ver no GitHub
 (8 comments) (10 reactions) (0 assignees)JavaScript (4.065 forks)batch import
enhancementhelp wantedstale

Métricas do repositório

Stars
 (13.136 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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

Guia do colaborador