Commit a443e61f authored by Gavin Williams's avatar Gavin Williams Committed by Commit Bot

Add ARIA labels for the printers Browse button

-Creating a new ARIA specific string for the Browse button as the text
 already displayed next to the button($i18n{selectDriver}) would not
 make sense spoken out loud.

Bug: 987087
Change-Id: I00a3d28672b0ffb85ddc00b49b605975b5e5b182
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1869478Reviewed-by: default avatarHector Carmona <hcarmona@chromium.org>
Reviewed-by: default avatarBailey Berro <baileyberro@chromium.org>
Commit-Queue: Gavin Williams <gavinwill@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710680}
parent e86781ed
...@@ -1610,6 +1610,9 @@ ...@@ -1610,6 +1610,9 @@
<message name="IDS_SETTINGS_PRINTING_CUPS_PRINTER_SELECT_DRIVER" desc="Label for the file selector to manually select a PPD file from the user's file system."> <message name="IDS_SETTINGS_PRINTING_CUPS_PRINTER_SELECT_DRIVER" desc="Label for the file selector to manually select a PPD file from the user's file system.">
Or specify your printer PPD Or specify your printer PPD
</message> </message>
<message name="IDS_SETTINGS_PRINTING_CUPS_PRINTER_BUTTON_SELECT_DRIVER_ARIA_LABEL" desc="ARIA label for the file selector button to manually select a PPD file from the user's file system. This text will not be visual on any page. It will only be spoken by screen readers.">
Browse to specify your printer PPD
</message>
<message name="IDS_SETTINGS_PRINTING_CUPS_PRINTER_BUTTON_SELECT_DRIVER" desc="Text for the button which allows user to select a PPD file from the file system."> <message name="IDS_SETTINGS_PRINTING_CUPS_PRINTER_BUTTON_SELECT_DRIVER" desc="Text for the button which allows user to select a PPD file from the file system.">
Browse Browse
</message> </message>
......
...@@ -204,7 +204,8 @@ ...@@ -204,7 +204,8 @@
aria-labelledby="ppdLabel" invalid="[[invalidPPD_]]" aria-labelledby="ppdLabel" invalid="[[invalidPPD_]]"
error-message="$i18n{selectDriverErrorMessage}" tabindex="-1"> error-message="$i18n{selectDriverErrorMessage}" tabindex="-1">
</cr-input> </cr-input>
<cr-button class="browse-button" on-click="onBrowseFile_"> <cr-button class="browse-button" on-click="onBrowseFile_"
aria-label="$i18n{selectDriverButtonAriaLabel}">
$i18n{selectDriverButtonText} $i18n{selectDriverButtonText}
</cr-button> </cr-button>
</div> </div>
......
...@@ -136,7 +136,8 @@ ...@@ -136,7 +136,8 @@
invalid="[[invalidPPD_]]"> invalid="[[invalidPPD_]]">
</cr-input> </cr-input>
<cr-button class="browse-button" on-click="onBrowseFile_" <cr-button class="browse-button" on-click="onBrowseFile_"
disabled="[[!isOnline_]]"> disabled="[[!isOnline_]]"
aria-label="$i18n{selectDriverButtonAriaLabel}">
$i18n{selectDriverButtonText} $i18n{selectDriverButtonText}
</cr-button> </cr-button>
</div> </div>
......
...@@ -2401,6 +2401,8 @@ void AddPrintingStrings(content::WebUIDataSource* html_source) { ...@@ -2401,6 +2401,8 @@ void AddPrintingStrings(content::WebUIDataSource* html_source) {
{"selectDriver", IDS_SETTINGS_PRINTING_CUPS_PRINTER_SELECT_DRIVER}, {"selectDriver", IDS_SETTINGS_PRINTING_CUPS_PRINTER_SELECT_DRIVER},
{"selectDriverButtonText", {"selectDriverButtonText",
IDS_SETTINGS_PRINTING_CUPS_PRINTER_BUTTON_SELECT_DRIVER}, IDS_SETTINGS_PRINTING_CUPS_PRINTER_BUTTON_SELECT_DRIVER},
{"selectDriverButtonAriaLabel",
IDS_SETTINGS_PRINTING_CUPS_PRINTER_BUTTON_SELECT_DRIVER_ARIA_LABEL},
{"selectDriverErrorMessage", {"selectDriverErrorMessage",
IDS_SETTINGS_PRINTING_CUPS_PRINTER_INVALID_DRIVER}, IDS_SETTINGS_PRINTING_CUPS_PRINTER_INVALID_DRIVER},
{"printerAddedSuccessfulMessage", {"printerAddedSuccessfulMessage",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment