The aria-atomic property is a WAI-rich web application attribute. The aria-atomic attribute is used in conjunction with the aria-live property when the webpage contains live regions. Additionally, when auto-updating content, such as a live chat widget, is included on a website, the content is frequently updated. In this circumstance, consumers need to know only the updated material, which is the most recently received message, as opposed to the complete chat content. The purpose of aria-atomic is to indicate whether assistive technology will display the full altered region or only a subset of it based on the aria-relevant attribute’s change notice. This helps the developers in recognizing these active locations and instructing assistive technologies on how to handle them. The aria-atomic is applicable to all elements of the markup’s base. The aria-atomic can be used for ARIA Labels like aria-live, aria-busy, and aria-relevant.
What is the function of the “aria-atomic” ARIA Label?
The aria-atomic attribute serves an essential purpose; it specifies whether the screen reader should always provide the active region as a whole, even if only a section of it changed. False and true are the possible settings. However, the default setting is false. Both accessibility APIs and the Document Object Model (DOM) contain events that indicate when assistive portions of the document have changed. When the content of a live area changes, user agents must inspect the altered element and traverse its ancestors to locate the first element with an aria-atomic set. When the content of a live area changes, user agents must examine the updated element and traverse the ancestors to find the first ancestor with an aria-atomic set.
What are the uses of the “aria-atomic” ARIA Label?
Listed below are the uses of the “aria-atomic” ARIA Label.
- Documents structure roles: Documents structure roles are utilized to describe the structure of a part of content. These restrictions are no longer applicable as browsers now support HTML components with the same semantic value. The roles lacking HTML equivalents, such as the presentation, toddler, and tooltips roles, give information about the document structure to assistive devices like screen readers considering the lack of equivalent native HTML tags.
- Landmark roles: Landmark roles enable the identification of a web page’s organization and structure. Programmatically representing structural information supplied visually through a layout by classifying and identifying page actions. Using landmark roles, screen readers allow keyboard navigation to essential areas of a page. However, excessive landmark roles produce noise in screen readers, making it harder to comprehend the page’s general layout.
- Live region roles: Live region roles are used to describe elements with dynamically changing content. When dynamic changes are discernible to the naked eye, they are visible to sighted users. These roles inform users with low vision and blindness when content has been updated. Assistive technology, such as screen readers, can be programmed to indicate the modification of dynamic material.
- Windows roles: Window roles are defined as the sub-windows of the primary document window within the same window, including pop-up modal dialogues.
- Abstract roles: Abstract roles are meant solely for use by browsers to help in document organization and streamlining. Developers who write HTML markup should employ them. Therefore, no significant information will be transmitted to assistive technology or users.
Example Uses of “aria-atomic” ARIA Label
Listed below are the example uses of the “aria-atomic” ARIA Label.
The aria-atomic attribute determines whether the screen reader should always display the live region as a whole, even if only a portion of the region changes.
<div id="clock" role="timer" aria-live="polite"> <span id="hours"></span> <span id="minutes"></span> </div>
<div id="date-input"> <label>Year: <input type="text" id="year" value="2000" onblur="change(event)"/> </label> </div>
<div id="date-output" aria-atomic="true" aria-live="polite"> The set year is: <span id="year-output">2000</span> </div>
<div aria atomic=“true” aria-live=“polite> <h3>Score Update </h3> <strong>Cleveland Cavaliers</strong>2 <strong>Boston Celtics</strong>1 </div>
<h2>Basket summary</h2> <div aria-live=“assertive””aria-atomic=“”true”> <p>Your bag contains <span id=“”number””>0</span> items. </p>
Listed below are the related ARIA Labels to “aria-atomic”.
- aria-relevant: The aria-relevant is related to the aria-atomic since both allow developers to identify elements and instruct assistive technologies on how to process them. The aria-relevant creates specific alerts made by the user when there is an ongoing update being done on the live region.
- aria-live: The aria-live is related to aria-atomic since both allow developers to identify elements and instruct assistive technologies on how to process them. The aria-live attribute indicates changes from the live region that there are ongoing revisions being done.
- aria-busy: The aria-busy is related to aria-atomic since both allow developers to identify particular elements. This would help them create instruction signals to assistive technologies on how that information is processed. The aria-busy state indicates allows the user to be notified that ongoing changes are being made and also updates the user when it is done.