diff options
author | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 22:53:40 +0000 |
---|---|---|
committer | dpapad@chromium.org <dpapad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-25 22:53:40 +0000 |
commit | 897124057c751d02db8cd7c34a9b4ed0bf901881 (patch) | |
tree | c2dafef198d2683e28474a3ecce3e45edfc55d3a /chrome | |
parent | e577c5944e7a1f073b0b9ce5731fdf98fe81ec21 (diff) | |
download | chromium_src-897124057c751d02db8cd7c34a9b4ed0bf901881.zip chromium_src-897124057c751d02db8cd7c34a9b4ed0bf901881.tar.gz chromium_src-897124057c751d02db8cd7c34a9b4ed0bf901881.tar.bz2 |
Print Preview: Adding aria-labels for the margin textboxes
BUG=101517
TEST=NONE
Review URL: http://codereview.chromium.org/8390013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107222 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/app/generated_resources.grd | 18 | ||||
-rw-r--r-- | chrome/browser/resources/print_preview/margin_textbox.js | 1 | ||||
-rw-r--r-- | chrome/browser/ui/webui/print_preview_data_source.cc | 4 |
3 files changed, 20 insertions, 3 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 7353f09..a833d64 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -6377,13 +6377,13 @@ Keep your key file in a safe place. You will need it to create new versions of y Use a number to indicate how many copies to print (1 or more). </message> <message name="IDS_PRINT_PREVIEW_INCREMENT_TITLE" desc="Title shown when the user hovers mouse over the increment button. Also added for improved accessibility"> - Increment + Increment </message> <message name="IDS_PRINT_PREVIEW_DECREMENT_TITLE" desc="Title shown when the user hovers mouse over the decrement button. Also added for improved accessibility"> - Decrement + Decrement </message> <message name="IDS_PRINT_PREVIEW_PRINT_PAGES_LABEL" desc="ARIA label used by screen reader to explain the purpose of the page selection textbox"> - Print Specific Pages + Print Specific Pages </message> <message name="IDS_PRINT_PREVIEW_OPTIONS_LABEL" desc="Options label currently providing the choice to print headers and footers."> Options @@ -6403,6 +6403,18 @@ Keep your key file in a safe place. You will need it to create new versions of y <message name="IDS_PRINT_PREVIEW_CUSTOM_MARGINS" desc="Option that specifies the page be printed with user-specified custom margins."> Custom </message> + <message name="IDS_PRINT_PREVIEW_TOP_MARGIN_LABEL" desc="ARIA label used by screen reader to explain the purpose of the top margin textbox."> + Top margin + </message> + <message name="IDS_PRINT_PREVIEW_BOTTOM_MARGIN_LABEL" desc="ARIA label used by screen reader to explain the purpose of the bottom margin textbox."> + Bottom margin + </message> + <message name="IDS_PRINT_PREVIEW_LEFT_MARGIN_LABEL" desc="ARIA label used by screen reader to explain the purpose of the left margin textbox."> + Left margin + </message> + <message name="IDS_PRINT_PREVIEW_RIGHT_MARGIN_LABEL" desc="ARIA label used by screen reader to explain the purpose of the right margin textbox."> + Right margin + </message> <!-- Load State --> <message name="IDS_LOAD_STATE_WAITING_FOR_DELEGATE"> diff --git a/chrome/browser/resources/print_preview/margin_textbox.js b/chrome/browser/resources/print_preview/margin_textbox.js index 3f3e80d..ec1944b 100644 --- a/chrome/browser/resources/print_preview/margin_textbox.js +++ b/chrome/browser/resources/print_preview/margin_textbox.js @@ -11,6 +11,7 @@ cr.define('print_preview', function() { box.setAttribute('type', 'text'); box.className = MarginTextbox.CSS_CLASS_MARGIN_TEXTBOX; box.value = '0'; + box.setAttribute('aria-label', localStrings.getString(groupName)); // @type {string} Specifies which margin this line refers to. box.marginGroup = groupName; diff --git a/chrome/browser/ui/webui/print_preview_data_source.cc b/chrome/browser/ui/webui/print_preview_data_source.cc index 020b42e..94241ae 100644 --- a/chrome/browser/ui/webui/print_preview_data_source.cc +++ b/chrome/browser/ui/webui/print_preview_data_source.cc @@ -123,6 +123,10 @@ PrintPreviewDataSource::PrintPreviewDataSource() AddLocalizedString("defaultMargins", IDS_PRINT_PREVIEW_DEFAULT_MARGINS); AddLocalizedString("noMargins", IDS_PRINT_PREVIEW_NO_MARGINS); AddLocalizedString("customMargins", IDS_PRINT_PREVIEW_CUSTOM_MARGINS); + AddLocalizedString("top", IDS_PRINT_PREVIEW_TOP_MARGIN_LABEL); + AddLocalizedString("bottom", IDS_PRINT_PREVIEW_BOTTOM_MARGIN_LABEL); + AddLocalizedString("left", IDS_PRINT_PREVIEW_LEFT_MARGIN_LABEL); + AddLocalizedString("right", IDS_PRINT_PREVIEW_RIGHT_MARGIN_LABEL); set_json_path("strings.js"); add_resource_path("print_preview.js", IDR_PRINT_PREVIEW_JS); |