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

Function computeAriaCurrent

src/role-helpers.js:289–296  ·  view source on GitHub ↗

* @param {Element} element - * @returns {boolean | string | null} -

(element)

Source from the content-addressed store, hash-verified

287 * @returns {boolean | string | null} -
288 */
289function computeAriaCurrent(element) {
290 // https://www.w3.org/TR/wai-aria-1.1/#aria-current
291 return (
292 checkBooleanAttribute(element, 'aria-current') ??
293 element.getAttribute('aria-current') ??
294 false
295 )
296}
297
298/**
299 * @param {Element} element -

Callers 1

queryAllByRoleFunction · 0.90

Calls 1

checkBooleanAttributeFunction · 0.85

Tested by

no test coverage detected