Commit ebfe89ba authored by Dominic Mazzoni's avatar Dominic Mazzoni Committed by Commit Bot

cr-checkbox can hide the ARIA description element

cr-checkbox uses a hidden element as the target of the aria-describedby
attribute. However, while that element is hidden visually it's still
part of the accessibility tree so screen reader users perceive two
different elements - the checkbox, followed by the description.

To fix this, we can just hide the description with aria-hidden=true. Its
text is still computed correctly by aria-describedby.

Bug: 1101148
Change-Id: I213d2164dad6f0f4a9caa194b16b14e7a4b85580
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2466060Reviewed-by: default avatarEsmael Elmoslimany <aee@chromium.org>
Commit-Queue: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#816389}
parent 6dd1f570
......@@ -161,7 +161,7 @@ List of customizable styles:
<div id="label-container" aria-hidden="true" part="label-container">
<slot></slot>
</div>
<div id="ariaDescription">[[ariaDescription]]</div>
<div id="ariaDescription" aria-hidden="true">[[ariaDescription]]</div>
</template>
<script src="cr_checkbox.js"></script>
</dom-module>
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