mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Bug 891335 - [AccessFu] Making lists with only one item use the singular form of 'List 1 item'. r=eeejay, marcoz
--- accessible/src/jsat/OutputGenerator.jsm | 6 +++--- .../tests/mochitest/jsat/test_landmarks.html | 4 ++-- .../tests/mochitest/jsat/test_utterance_order.html | 12 ++++++------ .../en-US/chrome/accessibility/AccessFu.properties | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-)
This commit is contained in:
parent
b30a370ce6
commit
92a6c38cf5
@ -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);
|
||||
|
@ -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"], ["*",
|
||||
|
@ -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.
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user