blockly > Field > recomputeAriaContext
Field.recomputeAriaContext() method
Recomputes the aria state and label for this field. Fields are generally hidden when in blocks in the flyout (except for top-level full-block fields), and otherwise set to a role of button (indicating they can be clicked to edit) and given the label returned from their computeAriaLabel method.
Subclasses can override this in order to change the role or label, but they must ensure they keep the correct behavior for fields in flyout blocks.
This method will return a boolean indicating if the element is displayed in the aria tree or not. This can be used by subclasses to determine whether or not to continue customizing the role and label (hidden elements should not have labels).
Signature:
protected recomputeAriaContext(): boolean;
Returns:
boolean
true if the element is in the accessibility tree, false if the aria state is hidden