From 9e63a091b2e8649587632c47cf1e2ad0d78ad95e Mon Sep 17 00:00:00 2001 From: Sam Thorogood Date: Tue, 15 Aug 2017 14:32:22 +0100 Subject: [PATCH] note about focus a11y --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 9c1cd52..669152a 100644 --- a/README.md +++ b/README.md @@ -90,3 +90,11 @@ dialog { transform: translate(0, -50%); } ``` + +## Extensions + +### Focus + +The WAI-ARIA doc suggests returning focus to the previously focused element after a modal dialog is closed. +However, this is not part of the dialog spec itself. +See [this snippet](https://gist.github.com/samthor/babe9fad4a65625b301ba482dad284d1) to add this, even to the native `dialog`.