aria-busy
Characteristics
Type:
- String
Used in Roles:
- All elements of the base markup (Global)
- No role required
Value:
- true/false
- true: The live region is loading.
- false (default): There are no more expected updates for that live region.
- error: The region is invalid
Indicates whether an element, and its subtree, are currently being updated.
aria-busy state should be used by the content authors when a portion on a web page has auto updating content.
aria-busy="true" is set when a relevant portion of the page is currently getting updated and the users are waiting to read the updated content. Users of assistive technology will not be able to read anything while the content is getting updated. They could probably hear "busy" with some screen readers. Once the content is updated, content authors can set aria-busy="false" or remove the aria-busy attribute Once the content is updated, the assistive technologies gather the updated information and provide it to the user.
aria-busy state is used as part of a live region. To notify the live region aria-live property is used. aria-live has three possible values aria-live="off", aria-live="polite" and aria-live="assertive".
In this example we have used aria-live="polite".
This politeness level is used when the user is not doing anything or when the user is waiting for the update to happen. If the user is busy with other task on the page the screen reader will not interrupt to provide the updated content of the live region. See the following example to understand how an aria-busy state can be used.
Example
<h2>Current Score</h2> <p aria-live="polite" aria-busy="true"></p>
In the above example when the update is done, content authors should take care that the aria-busy=”false” and the updated content is available in the paragraph.
<p ARIA-live="polite" aria-busy="false">the current score is 23/0 after 4 overs</p>
This property applies to live regions in the user interface. If authors know that multiple parts of the same live region need to be loaded, they can set aria-busy to true when the first part is loaded, and then set it to false when the last part is loaded.
The default is that aria-busy is false. When a widget is missing required owned elements due to script execution or loading, authors must mark a containing element with aria-busy equal to true. For example, until a page is fully initialized and complete, an author could mark the document element as busy. If there is an error updating the element, author may set the aria-invalid attribute to true.
Note For cross-browser compatibility, always use the aria attribute syntax to access and modify aria properties, for example object.setAttribute("aria-valuenow", newValue).
Syntax
HTML <element aria-busy="p" ... > JavaScript object.setAttribute("aria-busy",value);var value = object.getAttribute("aria-busy");
Microsoft Active Accessibility Properties:
- STATE_SYSTEM_BUSY (get_accState)
UI Automation Properties:
- N/A
UI Automation AriaProperties Property:
- busy