Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
4e55e090
Commit
4e55e090
authored
Mar 05, 2014
by
Byron Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 977137: Comment and Preview tabs need accessibility markup
r=dkl, a=justdave
parent
146bad33
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
5 deletions
+18
-5
field.js
js/field.js
+15
-4
comment.html.tmpl
template/en/default/bug/comment.html.tmpl
+3
-1
No files found.
js/field.js
View file @
4e55e090
...
...
@@ -994,16 +994,22 @@ function show_comment_preview(bug_id) {
var
Dom
=
YAHOO
.
util
.
Dom
;
var
comment
=
document
.
getElementById
(
'comment'
);
var
preview
=
document
.
getElementById
(
'comment_preview'
);
if
(
!
comment
||
!
preview
)
return
;
if
(
Dom
.
hasClass
(
'comment_preview_tab'
,
'active_comment_tab'
))
return
;
preview
.
style
.
width
=
(
comment
.
clientWidth
-
4
)
+
'px'
;
preview
.
style
.
height
=
comment
.
offsetHeight
+
'px'
;
var
comment_tab
=
document
.
getElementById
(
'comment_tab'
);
Dom
.
addClass
(
comment
,
'bz_default_hidden'
);
Dom
.
removeClass
(
'comment_tab'
,
'active_comment_tab'
);
Dom
.
removeClass
(
comment_tab
,
'active_comment_tab'
);
comment_tab
.
setAttribute
(
'aria-selected'
,
'false'
);
var
preview_tab
=
document
.
getElementById
(
'comment_preview_tab'
);
Dom
.
removeClass
(
preview
,
'bz_default_hidden'
);
Dom
.
addClass
(
'comment_preview_tab'
,
'active_comment_tab'
);
Dom
.
addClass
(
preview_tab
,
'active_comment_tab'
);
preview_tab
.
setAttribute
(
'aria-selected'
,
'true'
);
Dom
.
addClass
(
'comment_preview_error'
,
'bz_default_hidden'
);
...
...
@@ -1054,8 +1060,13 @@ function show_comment_edit() {
if
(
!
comment
||
!
preview
)
return
;
if
(
YAHOO
.
util
.
Dom
.
hasClass
(
comment
,
'active_comment_tab'
))
return
;
var
preview_tab
=
document
.
getElementById
(
'comment_preview_tab'
);
YAHOO
.
util
.
Dom
.
addClass
(
preview
,
'bz_default_hidden'
);
YAHOO
.
util
.
Dom
.
removeClass
(
'comment_preview_tab'
,
'active_comment_tab'
);
YAHOO
.
util
.
Dom
.
removeClass
(
preview_tab
,
'active_comment_tab'
);
preview_tab
.
setAttribute
(
'aria-selected'
,
'false'
);
var
comment_tab
=
document
.
getElementById
(
'comment_tab'
);
YAHOO
.
util
.
Dom
.
removeClass
(
comment
,
'bz_default_hidden'
);
YAHOO
.
util
.
Dom
.
addClass
(
'comment_tab'
,
'active_comment_tab'
);
YAHOO
.
util
.
Dom
.
addClass
(
comment_tab
,
'active_comment_tab'
);
comment_tab
.
setAttribute
(
'aria-selected'
,
'true'
);
}
template/en/default/bug/comment.html.tmpl
View file @
4e55e090
...
...
@@ -13,10 +13,12 @@
#%]
[% IF feature_enabled('jsonrpc') %]
<div id="comment_tabs">
<div id="comment_tabs"
role="tablist"
>
<div id="comment_tab" class="comment_tab active_comment_tab"
role="tab" aria-selected="true"
onclick="show_comment_edit()">Comment</div>
<div id="comment_preview_tab" class="comment_tab"
role="tab" aria-selected="false"
onclick="show_comment_preview([% bug.id FILTER none %])">Preview</div>
</div>
[% END %]
...
...
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