Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
f0bfedf3
Commit
f0bfedf3
authored
Oct 24, 2018
by
Andrew Nicols
Browse files
MDL-63714 theme_boost: Fix aria focus behat issues
parent
4b7ad884
Changes
2
Hide whitespace changes
Inline
Side-by-side
theme/boost/amd/build/aria.min.js
View file @
f0bfedf3
File suppressed by a .gitattributes entry or the file's encoding is unsupported.
theme/boost/amd/src/aria.js
View file @
f0bfedf3
...
...
@@ -65,8 +65,10 @@ define(['jquery'], function($) {
// Special handling for navigation keys when menu is open.
var
shiftFocus
=
function
(
element
)
{
M
.
util
.
pending_js
(
'
core/aria:delayed-focus
'
);
var
delayedFocus
=
function
()
{
$
(
this
).
focus
();
M
.
util
.
complete_js
(
'
core/aria:delayed-focus
'
);
}.
bind
(
element
);
setTimeout
(
delayedFocus
,
50
);
};
...
...
@@ -186,12 +188,14 @@ define(['jquery'], function($) {
// After page load, focus on any element with special autofocus attribute.
$
(
function
()
{
M
.
util
.
pending_js
(
'
core/aria:delayed-focus
'
);
window
.
setTimeout
(
function
()
{
var
alerts
=
$
(
'
[role="alert"][data-aria-autofocus="true"]
'
);
if
(
alerts
.
length
>
0
)
{
$
(
alerts
[
0
]).
attr
(
'
tabindex
'
,
'
0
'
);
$
(
alerts
[
0
]).
focus
();
}
M
.
util
.
complete_js
(
'
core/aria:delayed-focus
'
);
},
300
);
});
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment