MCPcopy
hub / github.com/testing-library/dom-testing-library / computeAriaPressed

Function computeAriaPressed

src/role-helpers.js:280–283  ·  view source on GitHub ↗

* @param {Element} element - * @returns {boolean | undefined} - false/true if (not)pressed, undefined if not press-able

(element)

Source from the content-addressed store, hash-verified

278 * @returns {boolean | undefined} - false/true if (not)pressed, undefined if not press-able
279 */
280function computeAriaPressed(element) {
281 // https://www.w3.org/TR/wai-aria-1.1/#aria-pressed
282 return checkBooleanAttribute(element, 'aria-pressed')
283}
284
285/**
286 * @param {Element} element -

Callers 1

queryAllByRoleFunction · 0.90

Calls 1

checkBooleanAttributeFunction · 0.85

Tested by

no test coverage detected