Skip to main content

ElementInternals

The ElementInternals interface of the Document Object Model gives web developers a way to allow custom elements to fully participate in HTML forms. It provides utilities for working with these elements in the same way you would work with any standard HTML form element, and also exposes the Accessibility Object Model to the element.

MDN Reference

Extends

Methods

checkValidity()

checkValidity(): boolean;

The checkValidity() method of the ElementInternals interface checks if the element meets any constraint validation rules applied to it.

MDN Reference

Returns

boolean


reportValidity()

reportValidity(): boolean;

The reportValidity() method of the ElementInternals interface checks if the element meets any constraint validation rules applied to it.

MDN Reference

Returns

boolean


setFormValue()

setFormValue(value, state?): void;

The setFormValue() method of the ElementInternals interface sets the element's submission value and state, communicating these to the user agent.

MDN Reference

Parameters

ParameterType
valuestring | FormData | File | null
state?string | FormData | File | null

Returns

void


setValidity()

setValidity(
flags?,
message?,
anchor?
): void;

The setValidity() method of the ElementInternals interface sets the validity of the element.

MDN Reference

Parameters

ParameterType
flags?ValidityStateFlags
message?string
anchor?HTMLElement

Returns

void

Properties

ariaActiveDescendantElement

ariaActiveDescendantElement: Element | null;

MDN Reference

Inherited from

ARIAMixin.ariaActiveDescendantElement


ariaAtomic

ariaAtomic: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaAtomic


ariaAutoComplete

ariaAutoComplete: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaAutoComplete


ariaBrailleLabel

ariaBrailleLabel: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaBrailleLabel


ariaBrailleRoleDescription

ariaBrailleRoleDescription: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaBrailleRoleDescription


ariaBusy

ariaBusy: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaBusy


ariaChecked

ariaChecked: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaChecked


ariaColCount

ariaColCount: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaColCount


ariaColIndex

ariaColIndex: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaColIndex


ariaColIndexText

ariaColIndexText: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaColIndexText


ariaColSpan

ariaColSpan: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaColSpan


ariaControlsElements

ariaControlsElements: readonly Element[] | null;

MDN Reference

Inherited from

ARIAMixin.ariaControlsElements


ariaCurrent

ariaCurrent: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaCurrent


ariaDescribedByElements

ariaDescribedByElements: readonly Element[] | null;

MDN Reference

Inherited from

ARIAMixin.ariaDescribedByElements


ariaDescription

ariaDescription: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaDescription


ariaDetailsElements

ariaDetailsElements: readonly Element[] | null;

MDN Reference

Inherited from

ARIAMixin.ariaDetailsElements


ariaDisabled

ariaDisabled: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaDisabled


ariaErrorMessageElements

ariaErrorMessageElements: readonly Element[] | null;

MDN Reference

Inherited from

ARIAMixin.ariaErrorMessageElements


ariaExpanded

ariaExpanded: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaExpanded


ariaFlowToElements

ariaFlowToElements: readonly Element[] | null;

MDN Reference

Inherited from

ARIAMixin.ariaFlowToElements


ariaHasPopup

ariaHasPopup: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaHasPopup


ariaHidden

ariaHidden: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaHidden


ariaInvalid

ariaInvalid: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaInvalid


ariaKeyShortcuts

ariaKeyShortcuts: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaKeyShortcuts


ariaLabel

ariaLabel: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaLabel


ariaLabelledByElements

ariaLabelledByElements: readonly Element[] | null;

MDN Reference

Inherited from

ARIAMixin.ariaLabelledByElements


ariaLevel

ariaLevel: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaLevel


ariaLive

ariaLive: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaLive


ariaModal

ariaModal: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaModal


ariaMultiLine

ariaMultiLine: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaMultiLine


ariaMultiSelectable

ariaMultiSelectable: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaMultiSelectable


ariaOrientation

ariaOrientation: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaOrientation


ariaOwnsElements

ariaOwnsElements: readonly Element[] | null;

MDN Reference

Inherited from

ARIAMixin.ariaOwnsElements


ariaPlaceholder

ariaPlaceholder: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaPlaceholder


ariaPosInSet

ariaPosInSet: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaPosInSet


ariaPressed

ariaPressed: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaPressed


ariaReadOnly

ariaReadOnly: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaReadOnly


ariaRelevant

ariaRelevant: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaRelevant


ariaRequired

ariaRequired: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaRequired


ariaRoleDescription

ariaRoleDescription: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaRoleDescription


ariaRowCount

ariaRowCount: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaRowCount


ariaRowIndex

ariaRowIndex: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaRowIndex


ariaRowIndexText

ariaRowIndexText: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaRowIndexText


ariaRowSpan

ariaRowSpan: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaRowSpan


ariaSelected

ariaSelected: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaSelected


ariaSetSize

ariaSetSize: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaSetSize


ariaSort

ariaSort: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaSort


ariaValueMax

ariaValueMax: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaValueMax


ariaValueMin

ariaValueMin: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaValueMin


ariaValueNow

ariaValueNow: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaValueNow


ariaValueText

ariaValueText: string | null;

MDN Reference

Inherited from

ARIAMixin.ariaValueText


form

readonly form: HTMLFormElement | null;

The form read-only property of the ElementInternals interface returns the HTMLFormElement associated with this element.

MDN Reference


labels

readonly labels: NodeList;

The labels read-only property of the ElementInternals interface returns the labels associated with the element.

MDN Reference


role

role: string | null;

MDN Reference

Inherited from

ARIAMixin.role


shadowRoot

readonly shadowRoot: ShadowRoot | null;

The shadowRoot read-only property of the ElementInternals interface returns the ShadowRoot for this element.

MDN Reference


states

readonly states: CustomStateSet;

The states read-only property of the ElementInternals interface returns a CustomStateSet representing the possible states of the custom element.

MDN Reference


validationMessage

readonly validationMessage: string;

The validationMessage read-only property of the ElementInternals interface returns the validation message for the element.

MDN Reference


validity

readonly validity: ValidityState;

The validity read-only property of the ElementInternals interface returns a ValidityState object which represents the different validity states the element can be in, with respect to constraint validation.

MDN Reference


willValidate

readonly willValidate: boolean;

The willValidate read-only property of the ElementInternals interface returns true if the element is a submittable element that is a candidate for constraint validation.

MDN Reference