Trilium Frontend API
    Preparing search index...

    Class AriaLiveAnnouncer

    An accessibility helper that manages all ARIA live regions associated with an editor instance. ARIA live regions announce changes to the state of the editor features.

    These announcements are consumed and propagated by screen readers and give users a better understanding of the current state of the editor.

    To announce a state change to an editor use the #announce method:

    editor.ui.ariaLiveAnnouncer.announce( 'Text of an announcement.' );
    
    Index

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • editor: Editor

      Returns AriaLiveAnnouncer

    Properties

    editor: Editor

    The editor instance.

    The view that aggregates all aria-live regions.

    Methods

    • Sets an announcement text to an aria region that is then announced by a screen reader to the user.

      If the aria region of a specified politeness does not exist, it will be created and can be re-used later.

      The default announcement politeness level is 'polite'.

      // Most screen readers will queue announcements from multiple aria-live regions and read them out in the order they were emitted.
      editor.ui.ariaLiveAnnouncer.announce( 'Image uploaded.' );
      editor.ui.ariaLiveAnnouncer.announce( 'Connection lost. Reconnecting.' );

      Parameters

      Returns void