* @param {Element} element - * @returns {boolean | undefined} - false/true if (not)checked, undefined if not checked-able
(element)
| 259 | * @returns {boolean | undefined} - false/true if (not)checked, undefined if not checked-able |
| 260 | */ |
| 261 | function computeAriaChecked(element) { |
| 262 | // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings |
| 263 | // https://www.w3.org/TR/html-aam-1.0/#details-id-56 |
| 264 | // https://www.w3.org/TR/html-aam-1.0/#details-id-67 |
| 265 | if ('indeterminate' in element && element.indeterminate) { |
| 266 | return undefined |
| 267 | } |
| 268 | if ('checked' in element) { |
| 269 | return element.checked |
| 270 | } |
| 271 | |
| 272 | // explicit value |
| 273 | return checkBooleanAttribute(element, 'aria-checked') |
| 274 | } |
| 275 | |
| 276 | /** |
| 277 | * @param {Element} element - |
no test coverage detected