Commit 65dea946 authored by Jacobo Aragunde Pérez's avatar Jacobo Aragunde Pérez Committed by Chromium LUCI CQ

Set accessible name to the checkbox in the history item.

According to the ARIA spec, a checkbox must have a name, but in the
history page we are not giving a name to the item with role checkbox
but to its parent instead.

The cr-checkbox component can render its light-DOM children to a hidden
div used by the checkbox as accessible label container, we make use this
feature to fix the problem.

Bug: 1152721
Change-Id: Ia36bab94497caa60832d02876307f844744340a5
AX-relnotes: make checkboxes in history page ARIA-compliant.
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2584502Reviewed-by: default avatarJohn Lee <johntlee@chromium.org>
Commit-Queue: Jacobo Aragunde Pérez <jaragunde@igalia.com>
Cr-Commit-Position: refs/heads/master@{#836631}
parent 67325639
......@@ -166,8 +166,9 @@
on-mousedown="onCheckboxClick_" on-keydown="onCheckboxClick_"
on-change="onCheckboxChange_" class="no-label"
hidden="[[selectionNotAllowed_]]"
disabled="[[selectionNotAllowed_]]"
aria-label$="[[getEntrySummary_(item)]]"></cr-checkbox>
disabled="[[selectionNotAllowed_]]">
[[getEntrySummary_(item)]]
</cr-checkbox>
</div>
<!-- ARIA hidden to avoid redundancy since timestamp is already part of
|getEntrySummary_|. -->
......
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