Commit c8076229 authored by James Vecore's avatar James Vecore Committed by Commit Bot

[Bluetooth] add aria-live/relevant attributes to toggle button

The Bluetooth toggle button disables itself after being pressed while
the hardware state is changing (to prevent click spamming) and
re-enables when the new state takes effect. The problem is that
Chromevox is reading the disabled state after a toggle and never
announces the updated enabled state after the hardware state is
applied. By making the element "aria-live" we request that Chromevox
announces the new state when the element state changes. This solution
results is some spammy Chromevox output, but that is better than never
announcing the state change at all.

Fixed: 1007378
Change-Id: I0632138bdea96c56edb0a0f1b9cca05d3ca2d9c2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1895255Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: James Vecore <vecore@google.com>
Cr-Commit-Position: refs/heads/master@{#713539}
parent 309aa1f2
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
<cr-toggle id="enableBluetooth" <cr-toggle id="enableBluetooth"
checked="{{bluetoothToggleState}}" checked="{{bluetoothToggleState}}"
disabled$="[[!isToggleEnabled_(adapterState, stateChangeInProgress)]]" disabled$="[[!isToggleEnabled_(adapterState, stateChangeInProgress)]]"
aria-label="$i18n{bluetoothToggleA11yLabel}"> aria-label="$i18n{bluetoothToggleA11yLabel}"
aria-live="polite" aria-relevant="all">
</cr-toggle> </cr-toggle>
</div> </div>
......
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