AutorÃa | Ultima modificación | Ver Log |
@coreFeature: Focus lock in modal popupsIn order to navigate a modal popup with keyboardAs a userThe tab key should cycle through elements in the form and not go outside itBackground:Given the following "courses" exist:| fullname | shortname || Course 1 | C1 |And the following "activities" exist:| activity | name | course | idnumber || forum | Test forum | C1 | forum1 |And I am on the "forum1" "Activity" page logged in as "admin"And I follow "Add discussion topic"And I click on "Image" "button"@javascriptScenario: Tab cycles through elements in modal, using image popup in Tiny as an example# Repeated tabs just to get to the last element. This may need changing if controls are added# or removed to the form.When I press the tab keyAnd I press the tab keyAnd I press the tab keyAnd I press the tab keyAnd I press the tab keyAnd the focused element is "Browse repositories" "button"# Tab past last element should go back to the first one, which is the modal itself, then the close button.And I press the tab keyAnd I press the tab keyThen the focused element is "Close" "button" in the "Insert image" "dialogue"And I press the shift tab keyAnd I press the shift tab keyAnd the focused element is "Browse repositories" "button"@javascriptScenario: Focus continues to be locked to modal even after closing nested modal# Open 'Browse repositories' nested modal, then close it again.When I press "Browse repositories"And I click on "Close" "button" in the "File picker" "dialogue"And the focused element is "Browse repositories" "button"# Focus should still wrap around to the start of the image modal.When I press the tab keyAnd I press the tab keyThen the focused element is "Close" "button" in the "Insert image" "dialogue"