Commit 5017cb08 authored by Pramith Dayananda's avatar Pramith Dayananda Committed by Robert Lyon
Browse files

Bug 1692759: Move focus to "Add" popup on "Pages and collections"

To improve accessibility, move the focus to the "Create a page or
collection" popup after clicking the "Add" button.

behatnotneeded

Change-Id: Ica158c2f99a2d94a74d58c4cfcc555d43db8cca4
parent 84884ba1
......@@ -33,11 +33,11 @@
</div>
{* Modal form *}
<div class="modal fade" id="addview-form">
<div tabindex="0" class="modal fade" id="addview-form">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<button type="button" class="btn close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">
<span class="icon icon-lg icon-plus prs"></span>
{str tag=confirmaddtitle section=view}
......@@ -73,6 +73,12 @@
window.location = url;
});
$('.modal').on('shown.bs.modal', function() {
$('#add-collection-button').focus();
});
$('.modal').on('hidden.bs.modal', function() {
$('#addview-button').focus();
});
</script>
{include file="footer.tpl"}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment