WAI-ARIA: Role=Document

An element containing content that assistive technology users may want to browse in a reading mode.
Description
An element containing content that assistive technology users may want to browse in a reading mode.
When user agent focus moves to an element assigned the role of document, assistive technologies having a reading mode for browsing static content MAY switch to that reading mode and intercept standard input events, such as Up or Down arrow keyboard events, to control the reading cursor.
Because assistive technologies that have a reading mode default to that mode for all elements except for those with either a widget or application role, the only circumstance where the document role is useful for changing assistive technology behavior is when the element with role document is a focusable child element of a widget or application. For example, given an application element which contains some static rich text, the author can apply role document to the element containing the text and give it a tabindex of 0. When a screen reader user presses the Tab key and places focus
Role=Document Example
HTML Example
<dialog tabindex="0" open="open" role="alertdialog" aria-labelledby="d-message">
<div>
<div role="document" tabindex="0">
<p id="d-message">I really do not like you pressing that</p>
<button>I understand</button>
</div>
</div>
</dialog>
HTML Example 2
<div role="document">
<h1>The Life of Albert Einstein</h1>
<p>Lorem ipsum...</p>
</div>
Characteristics
Superclass Role
Subclass Roles
Supported States and Properties
Inherited States and Properties
- aria-atomic
- aria-busy (state)
- aria-controls
- aria-current (state)
- aria-describedby
- aria-details
- aria-disabled (state)
- aria-dropeffect
- aria-errormessage
- aria-flowto
- aria-grabbed (state)
- aria-haspopup
- aria-hidden (state)
- aria-invalid (state)
- aria-keyshortcuts
- aria-label
- aria-labelledby
- aria-live
- aria-owns
- aria-relevant
- aria-roledescription
Name From
- author
Accessible Name Required
- False
Semantic HTML
No HTML element equivalent.
Reference
- WAI-ARIA 1.2 Specification
Refer to the notes from the WAI-ARIA 1.2 specification for more information on role=document.