Skip to content
This repository has been archived by the owner on May 5, 2022. It is now read-only.
/ announceThis Public archive

Dynamic aria-live regions; accessibility messaging system for screenreaders

License

Notifications You must be signed in to change notification settings

jasonday/announceThis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

announceThis

announceThis is a jquery plugin to dynamically create aria-live regions such as alerts, status messages, and log updates programmatically.

Usage

Alert

	$.announceThis({
        role: 'alert',
        message: 'This is an example of an alert message'
    });

Status

	$.announceThis({
        id: 'statusContainer',
        role: 'status',
        ariaLive: 'assertive'
        message: 'This is an example of an updated status message',
        ariaRelevant: 'additions removals'
    });

All options

	$.announceThis.defaults = {
        id: "announceThis",       // id of live region
        role: "status",           // log, alert, status, progressbar, marquee, timer
        ariaLive: "assertive",    // polite, assertive, alert (automatically becomes "alert" when role: "alert")
        ariaAtomic: false,        // present live region as a whole (support across screenreader/browser combinations is sketchy)
        ariaRelevant: "",         // 'additions', 'additions removals', 'removals' - does not work with role: alert
        message: ""               // message to pass to screenreader
    };

Notes

  • When using the same ID, the first instance of options will be the options used
  • role: 'alert' ignores all options except for message

Known Issues

About

Dynamic aria-live regions; accessibility messaging system for screenreaders

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published