Handles the visibility of an area regarding accessibility and screen readers. Does not manage the actual visibility from a style perspective.

To match the actual visibility, additional styles need to be added. The classes "open" and "hylo-open" are added/removed to this element depending on its status.

You can change the visibility by using the provided mehtodes or by adding/removing the class "open".

Properties

announcementClosed: string

The text announced when the area got closed.

announcementDelay: number = 500

The delay of the announcement in millisecond.

announcementElement: string | HTMLHyloAccessibilityAnnouncementElement

An HTMLHyloAccessibilityAnnouncementElement component eather as element or css query selection. If not set it looks for an hylo-page-root component and uses its element.

Used to announce opened or closed status. "announcementOpened" and/or "announcementClosed" needs to be set.

announcementOpened: string

The text announced when the area got opened.

Methods

  • Closes/hides the area.

    Returns Promise<void>

  • Opens/shows the area.

    Returns Promise<void>

  • Toggles the area between being open/visible or closed/hidden.

    Returns Promise<void>

  • Updates the component. Needs to be called when subcomponents where added or removed.

    Returns Promise<void>

Events

hyloChanging: EventEmitter<any>

Fires when the area gets closed or opened.

hyloClosing: EventEmitter<any>

Fires when the area gets closed/hidden.

hyloOpening: EventEmitter<any>

Fires when the area gets opened/visible.

Generated using TypeDoc