Developer Guide
Deep dive into the architecture of A11yCore and advanced integration techniques.
Architecture
A11yCore operates as a lightweight, non-blocking script that injects a Shadow DOM widget. It uses a `MutationObserver` to react to DOM changes and apply remediation purely via CSS and ARIA attribute injection, ensuring zero impact on your existing business logic.
Custom Events
Listen to widget events to trigger analytics or custom behaviors.
javascript
window.addEventListener('a11ycore:ready', (e) => {
console.log('Widget loaded version:', e.detail.version);
});
window.addEventListener('a11ycore:violation', (e) => {
// Log violations to your own error tracking
myLogger.warn('A11y Issue:', e.detail);
});Accessing the Instance
The global `A11yCore` object exposes methods to control the widget programmatically.
javascript
// Open the widget
window.A11yCore.open();
// Reset all user adjustments
window.A11yCore.reset();