Skip to content
This repository was archived by the owner on Aug 2, 2024. It is now read-only.

Conversation

@albrechtjohannes
Copy link
Contributor

Associated Issue
#236

Summary
This PR improves the accessibility of the modal component by adding a focus trap that is bound to the modal when opening it. To achieve this, I added a dependency to https://github.com/davidtheclark/focus-trap and a mixin, which is currently used only in the modal. However, it could also be used in other components, for example the popover component.

@CLAassistant
Copy link

CLAassistant commented Mar 14, 2019

CLA assistant check
All committers have signed the CLA.

@albrechtjohannes
Copy link
Contributor Author

For accessibility reasons we added a tabindex to the modal as well (e.g. for reading out the title). This As a result the browsers create a default outline when the modal gets focussed.

Copy link
Contributor

@ChristianKienle ChristianKienle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I ran the Modal demo locally with your changes and everything worked nicely. Feels much better. I have a question regarding the mixin. See my comment.

@albrechtjohannes albrechtjohannes force-pushed the feat/modal-keyboard-navigation branch from 9716cac to f20725f Compare March 15, 2019 08:54
@albrechtjohannes albrechtjohannes merged commit 7bb5391 into master Mar 15, 2019
@albrechtjohannes albrechtjohannes deleted the feat/modal-keyboard-navigation branch March 15, 2019 09:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants