Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@lwc/aria-reflection-polyfill

Package Overview
Dependencies
Maintainers
14
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lwc/aria-reflection-polyfill

ARIA element reflection polyfill for strings

  • 2.32.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
14
Created
Source

@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.

Keywords

FAQs

Package last updated on 29 Nov 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc