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
6d52d56b
Commit
6d52d56b
authored
Oct 15, 2013
by
polesye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change aria-label attribute to title.
parent
a9623064
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
lms/static/coffee/src/calculator.coffee
+11
-6
lms/templates/courseware/courseware.html
+1
-1
No files found.
lms/static/coffee/src/calculator.coffee
View file @
6d52d56b
...
@@ -18,19 +18,18 @@ class @Calculator
...
@@ -18,19 +18,18 @@ class @Calculator
event
.
preventDefault
()
event
.
preventDefault
()
$calc
=
$
(
'.calc'
)
$calc
=
$
(
'.calc'
)
$calcWrapper
=
$
(
'#calculator_wrapper'
)
$calcWrapper
=
$
(
'#calculator_wrapper'
)
text
=
gettext
(
'Open Calculator'
)
isExpanded
=
false
$
(
'div.calc-main'
).
toggleClass
'open'
$
(
'div.calc-main'
).
toggleClass
'open'
if
$calc
.
hasClass
(
'closed'
)
if
$calc
.
hasClass
(
'closed'
)
$calc
.
attr
'aria-label'
:
'Open Calculator'
'aria-expanded'
:
false
$calcWrapper
$calcWrapper
.
find
(
'input, a, dt, dd'
)
.
find
(
'input, a, dt, dd'
)
.
attr
'tabindex'
,
-
1
.
attr
'tabindex'
,
-
1
else
else
$calc
.
attr
text
=
gettext
(
'Close Calculator'
)
'aria-label'
:
'Close Calculator'
isExpanded
=
true
'aria-expanded'
:
true
$calcWrapper
$calcWrapper
.
find
(
'input, a'
)
.
find
(
'input, a'
)
.
attr
'tabindex'
,
0
.
attr
'tabindex'
,
0
...
@@ -39,6 +38,12 @@ class @Calculator
...
@@ -39,6 +38,12 @@ class @Calculator
# focus on the text field before it transitions onto the page.
# focus on the text field before it transitions onto the page.
setTimeout
(
->
$calcWrapper
.
find
(
'#calculator_input'
).
focus
()),
100
setTimeout
(
->
$calcWrapper
.
find
(
'#calculator_input'
).
focus
()),
100
$calc
.
attr
'title'
:
text
'aria-expanded'
:
isExpanded
.
text
text
$calc
.
toggleClass
'closed'
$calc
.
toggleClass
'closed'
helpOnFocus
:
(
e
)
->
helpOnFocus
:
(
e
)
->
...
...
lms/templates/courseware/courseware.html
View file @
6d52d56b
...
@@ -208,7 +208,7 @@ ${fragment.foot_html()}
...
@@ -208,7 +208,7 @@ ${fragment.foot_html()}
% if course.show_calculator:
% if course.show_calculator:
<div
class=
"calc-main"
>
<div
class=
"calc-main"
>
<a
aria-label=
"${_('Open Calculator')}"
href=
"#"
role=
"button"
aria-controls=
"calculator_wrapper"
aria-expanded=
"false"
class=
"calc"
>
${_("
Calculator")}
</a>
<a
title=
"${_('Open Calculator')}"
href=
"#"
role=
"button"
aria-controls=
"calculator_wrapper"
aria-expanded=
"false"
class=
"calc"
>
${_("Open
Calculator")}
</a>
<div
id=
"calculator_wrapper"
>
<div
id=
"calculator_wrapper"
>
<form
id=
"calculator"
>
<form
id=
"calculator"
>
<div
class=
"input-wrapper"
>
<div
class=
"input-wrapper"
>
...
...
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