2.32.1 • Published 2 years ago

@lwc/aria-reflection-polyfill v2.32.1

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

@lwc/aria-reflection-polyfill

Polyfill for ARIA string reflection on Elements. This is part of the Accessibility Object Model (AOM).

For example:

element.setAttribute('aria-pressed', 'true');
console.log(element.ariaPressed); // true
element.ariaPressed = false;
console.log(element.getAttribute('aria-pressed')); // false

Note that the attribute aria-pressed is reflected to the property ariaPressed, and vice versa.

Usage

npm install @lwc/aria-reflection-polyfill
import '@lwc/aria-reflection-polyfill';

The polyfill is applied as soon as it's imported.

Implementation

The polyfill patches these standard properties:

  • ariaAtomic
  • ariaAutoComplete
  • ariaBusy
  • ariaChecked
  • ariaColCount
  • ariaColIndex
  • ariaColSpan
  • ariaCurrent
  • ariaDisabled
  • ariaExpanded
  • ariaHasPopup
  • ariaHidden
  • ariaInvalid
  • ariaKeyShortcuts
  • ariaLabel
  • ariaLevel
  • ariaLive
  • ariaModal
  • ariaMultiLine
  • ariaMultiSelectable
  • ariaOrientation
  • ariaPlaceholder
  • ariaPosInSet
  • ariaPressed
  • ariaReadOnly
  • ariaRelevant
  • ariaRequired
  • ariaRoleDescription
  • ariaRowCount
  • ariaRowIndex
  • ariaRowSpan
  • ariaSelected
  • ariaSetSize
  • ariaSort
  • ariaValueMax
  • ariaValueMin
  • ariaValueNow
  • ariaValueText
  • role

As well as these currently non-standard properties:

  • ariaActiveDescendant
  • ariaControls
  • ariaDescribedBy
  • ariaDetails
  • ariaErrorMessage
  • ariaFlowTo
  • ariaLabelledBy
  • ariaOwns

To determine which browsers already support ARIA reflection, see this test.

2.31.8

2 years ago

2.31.7

2 years ago

2.32.0

3 years ago

2.31.1

3 years ago

2.30.2

3 years ago

2.31.0

3 years ago

2.30.1

3 years ago

2.31.3

2 years ago

2.31.2

3 years ago

2.32.1

3 years ago

2.30.3

3 years ago

2.30.0

3 years ago

2.31.5

2 years ago

2.31.4

2 years ago

2.31.6

2 years ago

2.29.0

3 years ago

2.28.1

3 years ago

2.28.0

3 years ago

2.26.2

3 years ago

2.25.0

3 years ago

2.24.0

3 years ago

2.26.1

3 years ago

2.27.0

3 years ago

2.26.0

3 years ago

2.25.1

3 years ago

2.23.6

3 years ago

2.23.5

3 years ago

2.23.4

3 years ago

2.23.3

3 years ago

2.23.2

3 years ago

2.23.1

3 years ago