Skip to content
/ aom.js Public

Polyfill for the accessibility object model

Notifications You must be signed in to change notification settings

lemnis/aom.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Current goals

  • Implementing phase 1 → basic implementation of the AccessibleNode constructor

Future work

  • Finish implementation of phase 2
  • Implement 3 & 4
  • Update the idrefs when an id is changed

General behavior and recommendations

  • ARIA does not reflect to AOM
<div id="clickBtn" role="button">Click here</div>
console.log(clickBtn.accessibleNode.role);   // null, not "button"
  • Don't target aria-* attributes with css, this will not work on browsers with native support

Don't do:

[aria-hidden="true"] { display: none; }

Differences between native AOM implementation

  • AOM.js does reflect to ARIA
clickBtn.accessibleNode.role = "link";
console.log(clickBtn.getAttribute("role"));  // Returns "link"
  • Relationships between nodes must be in the same tree scope

Uses

  • Proxy
  • Import / export
  • Classes (with extends)

About

Polyfill for the accessibility object model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published