Permalink
Browse files

structured the link title a bit

  • Loading branch information...
1 parent 97992e9 commit 2b1a416fd832e53ec3ff394af0eddb347052dd34 @icaaq committed May 10, 2012
Showing with 11 additions and 6 deletions.
  1. +1 −1 media/css/tabzilla.css
  2. +10 −5 media/js/tabzilla.js
View
@@ -92,7 +92,7 @@
direction: ltr;
}
#tabzilla-panel:focus{
- outline:none;
+ outline:none;
}
#tabzilla-panel.tabzilla-opened {
View
@@ -86,6 +86,10 @@ Tabzilla.READY_POLL_INTERVAL = 40;
Tabzilla.readyInterval = null;
Tabzilla.jQueryCDNSrc =
'//www.mozilla.org/media/js/libs/jquery-1.7.1.min.js';
+Tabzilla.LINK_TITLE = {
+ CLOSED: "Click to open up a section with even more interesting mozilla links",
+ OPENED: "Click again or press the escape key to close"
+}
Tabzilla.hasCSSTransitions = (function() {
var div = document.createElement('div');
@@ -258,7 +262,7 @@ Tabzilla.init = function()
"role": "button",
"aria-expanded": "false",
"aria-controls": Tabzilla.$panel.attr("id"),
- "title": "Click to open up a section with even more interesting mozilla links"
+ "title": Tabzilla.LINK_TITLE.CLOSED
});
Tabzilla.opened = false;
@@ -334,10 +338,9 @@ Tabzilla.open = function()
Tabzilla.$link.attr({
"aria-expanded": "true",
- "title": "Click again or press the escape key to close"
+ "title": Tabzilla.LINK_TITLE.OPENED
});
Tabzilla.$panel.focus();
-
Tabzilla.opened = true;
};
@@ -360,8 +363,10 @@ Tabzilla.close = function()
}
- Tabzilla.$link.attr("aria-expanded","false");
-
+ Tabzilla.$link.attr({
+ "aria-expanded": "false",
+ "title": Tabzilla.LINK_TITLE.CLOSED
+ });
Tabzilla.opened = false;
};

0 comments on commit 2b1a416

Please sign in to comment.