Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal focus management issues #56

Closed
cvrebert opened this issue Jan 7, 2015 · 4 comments
Closed

Modal focus management issues #56

cvrebert opened this issue Jan 7, 2015 · 4 comments

Comments

@cvrebert
Copy link
Contributor

cvrebert commented Jan 7, 2015

  • Clicking on a modal leaves the <a> that triggered the modal focused. For proper accessibility, the modal should become focused instead.
  • Closing a modal returns focus to the <body>. For better accessibility, the focus should be returned to the link that originally activated the modal.
@JimBobSquarePants
Copy link
Member

Thanks for that. In my tests the modal is focused on show. However you are right that the trigger should be focused on hide.

https://github.com/ResponsiveBP/Responsive/blob/v4/src/js/responsive.modal.js#L135

@cvrebert
Copy link
Contributor Author

cvrebert commented Jan 8, 2015

I beg to differ regarding show. Screencast on Mac Chrome:
modal
Note the blue focus ring on the link.

@JimBobSquarePants
Copy link
Member

No worries, thanks . Feel free to submit a pull request if you spot what is wrong.

@cvrebert
Copy link
Contributor Author

cvrebert commented Jan 8, 2015

Not interested in investigating the cause... Anyway, happy hunting!

JimBobSquarePants added a commit that referenced this issue Jan 9, 2015
Focus behaviour not correct for modal popup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants