This is an extension and not part of the main GoJS library. Note that the API for this class may change at any time. If you intend to use an extension in production, you should copy the code to your own source directory. See the Extensions intro page for more information.
Creates and sets the Aria live region. Defines variables for node selection history and runs setup method.
Optional
init: Partial<AriaCommandHandler>Override
do
This custom CommandHandler is an example of how screen reader accessibility can be added to diagrams with an
aria-live
DIV.This CommandHandler adds more key commands for a user:
b
: Give a description of which nodes are adjacent to the currently selected nodex
: Go backwards in the navigation historyc
: Go forwards in the navigation historyThis custom CommandHandler is meant as a starting point to create a more individualized CommandHandler for your unique use case. Certain data and attributes of nodes that are different between diagrams may be important to the accessibility interpretation. When describing a Part, this example calls getPartText, which uses the
Part.text
if it is specified, otherwise thePart.key
. You'll want to modify this to suit your needs.If you want to experiment with this extension, try the Accessibility sample.