* @param {Element} element - * @returns {boolean | undefined} - false/true if (not)selected, undefined if not selectable
(element)
| 235 | * @returns {boolean | undefined} - false/true if (not)selected, undefined if not selectable |
| 236 | */ |
| 237 | function computeAriaSelected(element) { |
| 238 | // implicit value from html-aam mappings: https://www.w3.org/TR/html-aam-1.0/#html-attribute-state-and-property-mappings |
| 239 | // https://www.w3.org/TR/html-aam-1.0/#details-id-97 |
| 240 | if (element.tagName === 'OPTION') { |
| 241 | return element.selected |
| 242 | } |
| 243 | |
| 244 | // explicit value |
| 245 | return checkBooleanAttribute(element, 'aria-selected') |
| 246 | } |
| 247 | |
| 248 | /** |
| 249 | * @param {Element} element - |
no test coverage detected