diff --git a/examples/menubar/menubar-1/js/PopupMenuLinks.js b/examples/menubar/menubar-1/js/PopupMenuLinks.js index d68b89cb41..cb240523db 100644 --- a/examples/menubar/menubar-1/js/PopupMenuLinks.js +++ b/examples/menubar/menubar-1/js/PopupMenuLinks.js @@ -241,7 +241,7 @@ PopupMenu.prototype.open = function () { this.domNode.style.zIndex = 100; } - this.controller.domNode.setAttribute('aria-expanded', 'true'); + this.domNode.setAttribute('aria-expanded', 'true'); }; @@ -256,6 +256,6 @@ PopupMenu.prototype.close = function (force) { if (force || (!this.hasFocus && !this.hasHover && !controllerHasHover)) { this.domNode.style.display = 'none'; this.domNode.style.zIndex = 0; - this.controller.domNode.setAttribute('aria-expanded', 'false'); + this.domNode.setAttribute('aria-expanded', 'false'); } }; diff --git a/examples/menubar/menubar-2/js/PopupMenuAction.js b/examples/menubar/menubar-2/js/PopupMenuAction.js index d70ccfd9f7..eca810259d 100644 --- a/examples/menubar/menubar-2/js/PopupMenuAction.js +++ b/examples/menubar/menubar-2/js/PopupMenuAction.js @@ -142,6 +142,22 @@ PopupMenuAction.prototype.updateMenuStates = function () { } } + // Update the radio buttons for font, in case they were updated using the larger + // smaller font menu items + + var rbs = this.domNode.querySelectorAll('[role=menuitemradio]'); + + for (var i = 0; i < rbs.length; i++) { + var rb = rbs[i]; + + if (this.actionManager.fontSize === rb.textContent.toLowerCase()) { + rb.setAttribute('aria-checked', 'true'); + } + else { + rb.setAttribute('aria-checked', 'false'); + } + } + }; /* EVENT HANDLERS */ diff --git a/examples/menubar/menubar-2/js/styleManager.js b/examples/menubar/menubar-2/js/styleManager.js index 9c48b718c7..d2140b3a01 100644 --- a/examples/menubar/menubar-2/js/styleManager.js +++ b/examples/menubar/menubar-2/js/styleManager.js @@ -51,7 +51,7 @@ StyleManager.prototype.setItalic = function (flag) { this.node.style.fontStyle = 'italic'; } else { - this.node.style.fontStyle = 'none'; + this.node.style.fontStyle = 'normal'; } }; diff --git a/examples/menubar/menubar-2/menubar-2.html b/examples/menubar/menubar-2/menubar-2.html index 96d852f930..6dad639224 100644 --- a/examples/menubar/menubar-2/menubar-2.html +++ b/examples/menubar/menubar-2/menubar-2.html @@ -90,8 +90,8 @@
li
li
aria-disabled="false"
+ li
+ aria-disabled="true"
+ li
+ menuitemcheckbox
@@ -521,7 +551,10 @@ li
menuitemcheckbox
.
+ menuitemcheckbox
.menu
element; a group
element is not necessary.
+