Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
505b6473
Commit
505b6473
authored
Jul 28, 2015
by
Peter Fogg
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #9082 from edx/peter-fogg/team-list-accessibility
Give teams view error messages focus.
parents
1061274b
becf15e5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
4 deletions
+12
-4
common/static/common/templates/components/paging-footer.underscore
+2
-1
lms/djangoapps/teams/static/teams/js/spec/teams_tab_spec.js
+8
-2
lms/djangoapps/teams/static/teams/js/views/teams_tab.js
+1
-0
lms/djangoapps/teams/static/teams/templates/teams_tab.underscore
+1
-1
No files found.
common/static/common/templates/components/paging-footer.underscore
View file @
505b6473
...
...
@@ -3,7 +3,8 @@
<div class="nav-item page">
<div class="pagination-form">
<label class="page-number-label" for="page-number-input"><%= gettext("Page number") %></label>
<input id="page-number-input" class="page-number-input" name="page-number" type="text" size="4" autocomplete="off" />
<input id="page-number-input" class="page-number-input" name="page-number" type="text" size="4" autocomplete="off" aria-describedby="page-number-input-helper"/>
<span class="sr field-helper" id="page-number-input-helper"><%= gettext("Enter the page number you'd like to quickly navigate to.") %></span>
</div>
<span class="current-page"><%= current_page %></span>
...
...
lms/djangoapps/teams/static/teams/js/spec/teams_tab_spec.js
View file @
505b6473
...
...
@@ -16,6 +16,9 @@ define([
},
expectError
=
function
(
text
)
{
expect
(
teamsTabView
.
$
(
'.warning'
).
text
()).
toContain
(
text
);
},
expectFocus
=
function
(
element
)
{
expect
(
element
.
focus
).
toHaveBeenCalled
();
};
beforeEach
(
function
()
{
...
...
@@ -40,6 +43,7 @@ define([
course_id
:
'test/course/id'
}).
render
();
Backbone
.
history
.
start
();
spyOn
(
$
.
fn
,
'focus'
);
});
afterEach
(
function
()
{
...
...
@@ -58,17 +62,19 @@ define([
expectContent
(
'This is the new Teams tab.'
);
});
it
(
'displays an error message when trying to navigate to a nonexistent route'
,
function
()
{
it
(
'displays an
d focuses an
error message when trying to navigate to a nonexistent route'
,
function
()
{
teamsTabView
.
router
.
navigate
(
'test'
,
{
trigger
:
true
});
expectError
(
'The page "test" could not be found.'
);
expectFocus
(
teamsTabView
.
$
(
'.warning'
));
});
it
(
'displays an error message when trying to navigate to a nonexistent topic'
,
function
()
{
it
(
'displays an
d focuses an
error message when trying to navigate to a nonexistent topic'
,
function
()
{
var
requests
=
AjaxHelpers
.
requests
(
this
);
teamsTabView
.
router
.
navigate
(
'topics/test'
,
{
trigger
:
true
});
AjaxHelpers
.
expectRequest
(
requests
,
'GET'
,
'api/topics/test,course_id'
,
null
);
AjaxHelpers
.
respondWithError
(
requests
,
404
);
expectError
(
'The topic "test" could not be found.'
);
expectFocus
(
teamsTabView
.
$
(
'.warning'
));
});
});
});
lms/djangoapps/teams/static/teams/js/views/teams_tab.js
View file @
505b6473
...
...
@@ -255,6 +255,7 @@
var
warningEl
=
this
.
$
(
'.warning'
);
warningEl
.
find
(
'.copy'
).
html
(
'<p>'
+
message
+
'</p'
);
warningEl
.
toggleClass
(
'is-hidden'
,
false
);
warningEl
.
focus
();
},
hideWarning
:
function
()
{
...
...
lms/djangoapps/teams/static/teams/templates/teams_tab.underscore
View file @
505b6473
<div class="wrapper-msg is-incontext urgency-low warning is-hidden">
<div class="wrapper-msg is-incontext urgency-low warning is-hidden"
tabindex="-1"
>
<div class="msg">
<div class="msg-content">
<div class="copy">
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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