Problem/Motivation

Currently, when a Modal window is open, I am unable to close ME modal windows using the "escape" key on my keyboard. Modal windows that are not ME related work as intended. This is just related to ME.

Steps to reproduce

This can be tested by using your keyboard.
Go to any content that uses ME. Add a new section, and once the modal is open, hit escape. Nothing happens but the modal should disappear and focus should be brought to what triggered the open modal.

Proposed resolution

Pressing the "escape" key on my keyboard should close any open ME modal and bring the focus back to what triggered the modal.

Comments

michaelablackham created an issue. See original summary.

justin2pin’s picture

justin2pin’s picture

Status: Active » Needs review
michaelablackham’s picture

Status: Needs review » Needs work

I currently hit "escape" and the modal disappears. However, I am brought back to the top of the page and not to the element that triggered the action.

The ideal functionality is to close the window and return the :focus back to the link or button that triggered the action. that way a user can continue on their tab journey without starting over.

This same action should happen when you hit the "X" (close) icon as well. Currently they both bring focus back to the top of the page.

Screencast showing me hitting "escape" and focus is brought back to top and you next tab shows "skip to main content" https://share.cleanshot.com/G7KfmR27

justin2pin’s picture

Status: Needs work » Needs review
michaelablackham’s picture

Status: Needs review » Reviewed & tested by the community
  1. I can click the "close" and focus is brought back to the element that triggered it
  2. I can hit "escape" key and the element closes and focus is brought back to the element that triggered it

This is working as it should and can be merged in

justin2pin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.