Commit 2cf002af authored by Jack Lynch's avatar Jack Lynch Committed by Commit Bot

DevTools: Add ARIAUtils.setCheckboxAsIndeterminate

This adds a new API to UI.ARIAUtils to set an element's aria-checked
attribute to 'mixed', which is the equivalent of setting
intedeterminate=true on an actual checkbox element.
This is needed to support keyboard accessibility in the javascript and
event listener breakpoints views.

Equivalent to the Animation checkbox in this screenshot:
https://gyazo.com/99f2067f6810af3366943176393d8b2f

Bug: 963183
Change-Id: Ie09f8e993d1776774c410f6099356f3a1d912048
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1715815Reviewed-by: default avatarPavel Feldman <pfeldman@chromium.org>
Auto-Submit: Jack Lynch <jalyn@microsoft.com>
Commit-Queue: Jack Lynch <jalyn@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#696551}
parent 8a8d4846
...@@ -229,6 +229,13 @@ UI.ARIAUtils.setChecked = function(element, value) { ...@@ -229,6 +229,13 @@ UI.ARIAUtils.setChecked = function(element, value) {
element.setAttribute('aria-checked', !!value); element.setAttribute('aria-checked', !!value);
}; };
/**
* @param {!Element} element
*/
UI.ARIAUtils.setCheckboxAsIndeterminate = function(element) {
element.setAttribute('aria-checked', 'mixed');
};
/** /**
* @param {!Element} element * @param {!Element} element
* @param {boolean} value * @param {boolean} value
......
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