If set, the announcement cuts in as soon as the change occurs. Otherwise the announcement waits until a possible current announcement ends.
The initial text of the component. This text is set with a delay after the components initialisation. Initial text just nested inside the component in the markup might get overlooked.
The delay the initial text is set in milliseconds.
By default the content is hidden by using the "clip" css feature.
If the property "position" is set, the content is hidden outside the screen to the "left: -10000px".
The aria role of the announcement field. If you have problems announcing text or need additional attention, set it to "alert".
Sets the content "top: -500px" instead of "left: -10000px" outside the screen when property "position" is set.
Announces the text by setting the text as content of the component.
Changes the content back to the original silently with the next mouse or keyboard event bubbling up to the body.
If the component is set to aria-hidden="true", it will be set to "false" for the duration of the announcement and set back to "true" when the content is set back to its original.
the text to be announced
the delay in millisecond for the text to be set (min. 150)
Sets the focus and with it the tab position to the component. Use this instead of element.focus().
If the tabindex is not set explicitly to 0 or higher, the focusability (reachability by tabulator key) of the component will only last as long as the component has the focus.
If you change the focus to the component, a screen reader will read the content of the component (again). "setText" right before setting the focus should be done "quietly" because it will be read when gaining focus. Use the third parameter "loud_when_focus" of "setText" when you don't know whether the component has already the focus.
Optional
blur_text: stringtext which will be set as content of the component after the component looses focus again
Optional
quietly: booleanshould the blur text be set unannounced
Sets the text of the component permanently.
text which will be set as content of the component
Optional
quietly: booleanshould the text be set unannounced
Optional
loud_when_focus: booleanshould the text be set unanounced only when the component doesn't have the focus (set "quietly" true)
Generated using TypeDoc
The (text)content wrapped inside the HyloAccessibilityAnnouncement component is announced in a screen reader. If the content changes, the updated content will be read in the screen reader. Use the methods "setAnnouncement" and "setText" of the component to change the content.
You can choose when the announcement occurs depending on the importance set.
Hides the content visiualy but keeps it accessable to screen readers.
Keep in mind that actual hidden components are ignored by screen readers.