Commit cffc7ede authored by Nnamdi Theodore Johnson-Kanu's avatar Nnamdi Theodore Johnson-Kanu Committed by Commit Bot

[accessiblity] Fix dialog title being vocalized twice

- Adds temporary fix to cr-dialog, to fix dialog title being vocalized
  twice by chromeVOX, this should be reversed when crbug.com/1139958 is
  closed.
- Add vocalization of signal strength icon

Bug: 1007433
Change-Id: I6a1dc2d8d37bc3e7e43097bcf2aa568c280152b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2480884
Commit-Queue: Nnamdi Theodore Johnson-kanu <tjohnsonkanu@google.com>
Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Reviewed-by: default avatarRegan Hsu <hsuregan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819219}
parent 1866d847
...@@ -79,8 +79,7 @@ ...@@ -79,8 +79,7 @@
<div id="host-device-container"> <div id="host-device-container">
<iron-icon id="host-device-signal-strength-icon" <iron-icon id="host-device-signal-strength-icon"
icon="[[getSignalStrengthIconName_(managedProperties)]]" icon="[[getSignalStrengthIconName_(managedProperties)]]"
aria-label$="[[getSignalStrengthLabel_(managedProperties)]]" aria-label$="[[getSignalStrengthLabel_(managedProperties)]]">
aria-hidden="true">
</iron-icon> </iron-icon>
<div id="host-device-text-container"> <div id="host-device-text-container">
<span id="host-device-text-name" <span id="host-device-text-name"
......
...@@ -145,9 +145,13 @@ ...@@ -145,9 +145,13 @@
margin-top: 4px; margin-top: 4px;
} }
</style> </style>
<!-- TODO(crbug/1139958): Remove "not chromeos" block when chromeVox issue is fixed-->
<!--Update both "not chromeos" and "chromeos" blocks if either changes-->
<if expr="not chromeos">
<dialog id="dialog" on-close="onNativeDialogClose_" <dialog id="dialog" on-close="onNativeDialogClose_"
on-cancel="onNativeDialogCancel_" part="dialog" aria-labelledby="title"> on-cancel="onNativeDialogCancel_" part="dialog"
<!-- This wrapper is necessary, such that the "pulse" animation is not aria-labelledby="title">
<!-- This wrapper is necessary, such that the "pulse" animation is not
erroneously played when the user clicks on the outer-most scrollbar. --> erroneously played when the user clicks on the outer-most scrollbar. -->
<div id="content-wrapper" part="wrapper"> <div id="content-wrapper" part="wrapper">
<div class="top-container"> <div class="top-container">
...@@ -168,6 +172,32 @@ ...@@ -168,6 +172,32 @@
<slot name="footer"></slot> <slot name="footer"></slot>
</div> </div>
</dialog> </dialog>
</if>
<if expr="chromeos">
<dialog id="dialog" on-close="onNativeDialogClose_"
on-cancel="onNativeDialogCancel_" part="dialog">
<!-- This wrapper is necessary, such that the "pulse" animation is not
erroneously played when the user clicks on the outer-most scrollbar. -->
<div id="content-wrapper" part="wrapper">
<div class="top-container">
<div id="title" class="title-container" tabindex="-1">
<slot name="title"></slot>
</div>
<cr-icon-button id="close" class="icon-clear"
hidden$="[[!showCloseButton]]" aria-label$="[[closeText]]"
on-click="cancel" on-keypress="onCloseKeypress_">
</cr-icon-button>
</div>
<slot name="header"></slot>
<div class="body-container" id="container" show-bottom-shadow
part="body-container">
<slot name="body"></slot>
</div>
<slot name="button-container"></slot>
<slot name="footer"></slot>
</div>
</dialog>
</if>
</template> </template>
<script src="cr_dialog.js"></script> <script src="cr_dialog.js"></script>
</dom-module> </dom-module>
...@@ -54,6 +54,7 @@ ...@@ -54,6 +54,7 @@
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_CR_ELEMENTS_CR_DIALOG_HTML" <structure name="IDR_CR_ELEMENTS_CR_DIALOG_HTML"
file="cr_elements/cr_dialog/cr_dialog.html" file="cr_elements/cr_dialog/cr_dialog.html"
preprocess="true"
type="chrome_html" /> type="chrome_html" />
<structure name="IDR_CR_ELEMENTS_CR_DIALOG_JS" <structure name="IDR_CR_ELEMENTS_CR_DIALOG_JS"
file="cr_elements/cr_dialog/cr_dialog.js" file="cr_elements/cr_dialog/cr_dialog.js"
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<include name="IDR_CR_ELEMENTS_CR_DIALOG_M_JS" <include name="IDR_CR_ELEMENTS_CR_DIALOG_M_JS"
file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.m.js" file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_dialog/cr_dialog.m.js"
use_base_dir="false" use_base_dir="false"
preprocess="true"
type="BINDATA" /> type="BINDATA" />
<include name="IDR_CR_ELEMENTS_CR_DRAWER_M_JS" <include name="IDR_CR_ELEMENTS_CR_DRAWER_M_JS"
file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.m.js" file="${root_gen_dir}/ui/webui/resources/cr_elements/cr_drawer/cr_drawer.m.js"
......
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