In JavaScript, ariaMultiLine reflects the aria-multiline attribute: a string ("true" / "false") that tells assistive technology whether a text box accepts multiple lines or only one (MDN).
Read the notes below before you get or set this property. Prefer feature detection when support is limited.
Syntax
Use el.ariaMultiLine. Start with this line.
JavaScript
element.ariaMultiLine
Call
What it does
element.ariaMultiLine
Primary signature.
Built into the browser. Read or assign el.ariaMultiLine — no import required.
Library declarations
JavaScript
element.ariaMultiLine
Parameters
Parameter
Description
Value
Optional. "true" or "false"
Enter key handling
Required. Must match the announced mode
Custom elements
Optional. ElementInternals.ariaMultiLine
Return Value
Return Value
Description
*
The current value of el.ariaMultiLine.
JavaScript Examples
Example 1 — Get and Set (MDN)
Read the current mode, then switch the textbox to single-line.
JavaScript
let el = document.getElementById("txtBoxInput");
console.log(el.ariaMultiLine); // "true"
el.ariaMultiLine = "false";
console.log(el.ariaMultiLine); // "false"
Write via the property. Attribute updates immediately.
Read via getAttribute. Same value as ariaMultiLine.
Write via the attribute. Property reflects the change.
Use string tokens."true" and "false".
Compatibility
Browser Support
Element.ariaMultiLine is marked Baseline Widely available on MDN (since October 2023). Logos use the shared browser-image-sprite.png sprite from this project.
✓ Baseline · Widely available
Element ariaMultiLine
Reflects aria-multiline — whether a textbox accepts multiple lines.
WidelyAvailable
Google ChromeFull support · Desktop & Mobile
Full support
Mozilla FirefoxFull support · Desktop & Mobile
Full support
Apple SafariFull support · macOS & iOS
Full support
Microsoft EdgeFull support · Chromium
Full support
OperaFull support · Modern versions
Full support
Internet ExplorerNo Element.ariaMultiLine
Not supported
ariaMultiLineBaseline support
Bottom line: Safe in modern browsers. Prefer textarea/input when you can; use ariaMultiLine on custom role=textbox widgets. See the MDN Element.ariaMultiLine reference.
Frequently Asked Questions
It reflects the aria-multiline attribute as a string, indicating whether a text box accepts multiple lines of input or only a single line.
No. MDN marks Element.ariaMultiLine as Baseline Widely available (since October 2023). It is not Deprecated, Experimental, or Non-standard.
The strings "true" (multi-line text box) or "false" (single-line text box).
No when you can avoid it. MDN recommends using an HTML input with type="text" or a textarea when possible, because they have built-in semantics and do not require ARIA attributes.
When you build a custom role="textbox" (for example a contenteditable div) and need to tell assistive technologies whether Enter creates a new line or submits.
Yes. Reading and writing ariaMultiLine updates the reflected aria-multiline attribute. Keep the actual keyboard behavior in sync with the value.