FocusableHeadingNode¶
Overview¶
A Node represented by a heading in the parallel dom that can receive focus. Typically headings are not focusable and not interactive. But it may be desirable to put focus on a heading to orient the user or control where the traversal order starts without focusing an interactive component.
When a screen reader is focused on a heading it will read the name of the heading and possibly the content below it.
@author Jesse Greenberg (PhET Interactive Simulations)
Class FocusableHeadingNode¶
Constructor¶
new FocusableHeadingNode( providedOptions? : FocusableHeadingNodeOptions )¶
Instance Methods¶
focus()¶
Focus this heading in the Parallel DOM. The screen reader will read its name and possibly content below it. Traversal with alternative input will continue from wherever this element is located in the PDOM order.
Once the heading loses focus, it is removed from the traversal order until this is called explicitly again.
dispose()¶
Type FocusableHeadingNodeOptions¶
- headingLevel?: HeadingLevelNumber
The heading level for this focusable heading in the PDOM, 1-6 according to DOM spec. - & StrictOmit<NodeOptions, "tagName" | "focusHighlight">
Source Code¶
See the source for FocusableHeadingNode.ts in the scenery repository.