A reference to the current renderer
Button element for handling touch hooks.
Internal variable, see isActive getter.
Internal variable, see isMobileAccessibility getter.
Maps the div button press to pixi's InteractionManager (click)
Maps the div focus events to pixi's InteractionManager (mouseover)
Maps the div focus events to pixi's InteractionManager (mouseout)
Is called when a key is pressed
Is called when the mouse moves across the renderer element
Activating will cause the Accessibility layer to be shown. This is called when a user presses the tab key.
Adds a DisplayObject to the accessibility manager
Count to throttle div updates on android devices.
The frequency to update the div elements.
The array of currently active accessible items.
Creates the touch hooks.
Deactivating will cause the Accessibility layer to be hidden. This is called when a user moves the mouse.
Setting this to true will visually show the divs.
Destroys the touch hooks.
This is the dom element that will sit over the PixiJS element. This is where the div overlays will go.
A simple pool for storing divs.
This is a tick used to check if an object is no longer being rendered.
The renderer this accessibility manager works for.
Before each render this function will ensure that all divs are mapped correctly to their DisplayObjects.
This recursive function will run through the scene graph and add any new accessible objects to the DOM layer.
Value of true
if accessibility is currently active and accessibility layers are showing.
Value of true
if accessibility is enabled for touch devices.
Adjust the hit area based on the bounds of a display object
Bounds of the child
Destroys the accessibility manager
private function that will visually add the information to the accessability div
Generated using TypeDoc
The Accessibility manager recreates the ability to tab and have content read by screen readers. This is very important as it can possibly help people with disabilities access PixiJS content.
A DisplayObject can be made accessible just like it can be made interactive. This manager will map the events as if the mouse was being used, minimizing the effort required to implement.
An instance of this class is automatically created by default, and can be found at
renderer.plugins.accessibility
PIXI