diff --git a/accessible/src/jsat/OutputGenerator.jsm b/accessible/src/jsat/OutputGenerator.jsm index 60d930e86d59..0dc6fc93ef22 100644 --- a/accessible/src/jsat/OutputGenerator.jsm +++ b/accessible/src/jsat/OutputGenerator.jsm @@ -595,10 +595,10 @@ this.UtteranceGenerator = { _getListUtterance: function _getListUtterance(aAccessible, aRoleStr, aFlags, aItemCount) { let desc = []; let roleStr = this._getLocalizedRole(aRoleStr); - if (roleStr) + if (roleStr) { desc.push(roleStr); - desc.push - (gStringBundle.formatStringFromName('listItemCount', [aItemCount], 1)); + } + desc.push(this._getPluralFormString('listItemCount', aItemCount)); let utterance = [desc.join(' ')]; this._addName(utterance, aAccessible, aFlags); diff --git a/accessible/tests/mochitest/jsat/test_landmarks.html b/accessible/tests/mochitest/jsat/test_landmarks.html index 383b480a6412..38b2a8198fc5 100644 --- a/accessible/tests/mochitest/jsat/test_landmarks.html +++ b/accessible/tests/mochitest/jsat/test_landmarks.html @@ -72,9 +72,9 @@ "main"]] }, { accOrElmOrID: "complementary", - expectedUtterance: [["list 1 items", "complementary", "First item", + expectedUtterance: [["list 1 item", "complementary", "First item", "A complementary"], ["A complementary", "First item", - "complementary", "list 1 items"]], + "complementary", "list 1 item"]], // XXX: The '*' should probably come before all of the context // utterance. expectedBraille: [["complementary", "*", "A complementary"], ["*", diff --git a/accessible/tests/mochitest/jsat/test_utterance_order.html b/accessible/tests/mochitest/jsat/test_utterance_order.html index 14ee1a57cbfc..3d26ef9d6b0b 100644 --- a/accessible/tests/mochitest/jsat/test_utterance_order.html +++ b/accessible/tests/mochitest/jsat/test_utterance_order.html @@ -39,8 +39,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=753984 }, { accOrElmOrID: "list", expected: [ - ["list 1 items", "First item", "1.", "list one"], - ["1.", "list one", "First item", "list 1 items"] + ["list 1 item", "First item", "1.", "list one"], + ["1.", "list one", "First item", "list 1 item"] ] }, { accOrElmOrID: "dlist", @@ -51,8 +51,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=753984 }, { accOrElmOrID: "li_one", expected: [ - ["list 1 items", "First item", "1.", "list one"], - ["1.", "list one", "First item", "list 1 items"] + ["list 1 item", "First item", "1.", "list one"], + ["1.", "list one", "First item", "list 1 item"] ] }, { accOrElmOrID: "cell", @@ -71,8 +71,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=753984 accOrElmOrID: "list", oldAccOrElmOrID: "li_one", expected: [ - ["list 1 items", "First item", "1.", "list one"], - ["1.", "list one", "First item", "list 1 items"] + ["list 1 item", "First item", "1.", "list one"], + ["1.", "list one", "First item", "list 1 item"] ] }, { // Test pivot to "apples" link from the table cell. diff --git a/dom/locales/en-US/chrome/accessibility/AccessFu.properties b/dom/locales/en-US/chrome/accessibility/AccessFu.properties index 0ccfc61f8d81..193d52ddd019 100644 --- a/dom/locales/en-US/chrome/accessibility/AccessFu.properties +++ b/dom/locales/en-US/chrome/accessibility/AccessFu.properties @@ -78,7 +78,7 @@ headingLevel = heading level %S # more sophisticated list announcement listStart = First item listEnd = Last item -listItemCount = %S items +listItemCount = 1 item;#1 items # Landmark announcements banner = banner