What’s probably coming in the ARIA1.2?_part2

A Quick recap

This is the continuation of part1(what’s probably going to come in ARIA1.2-part1) blog post and we pretty much covered the new roles(such as blockquote, caption, code, deletion, insertion, and so on..)  that are probably going to come in the ARIA1.2 as part of the previous blog post. Let us look into the changes that are probably going to take place on the existing attributes and roles usage in this part2 blog post.

 

Changes that are probably going to take place on the existing roles and attributes usage

Combobox(role)

There are significant changes that are going to take place for combobox role(role=”combobox”)  in ARIA 1.2. ARIA 1.1 combobox role implementation pattern is going to be no longer valid once ARIA 1.2 becomes W3C recommendation as the support of ARIA 1.1 combobox role implementation pattern is not very great. ARIA 1.2 combobox implementation pattern talks more or less ARIA 1.0 combobox implementation with aria-controls instead of aria-owns.

 

Aria-disabled(state)

Aria-disabled attribute is not going to be global attribute any more and it is allowed only in the certain roles

 

Aria-invalid(state)

Aria-invalid attribute is not going to be global attribute anymore and it is allowed only in the certain roles. The value of aria-invalid is also going to be enumerated type and it means that aria-invalid accepts certain list of token values

 

Aria-errormessage(property)

Aria-errormesage attribute is not going to be global attribute anymore and it is allowed only in the certain roles.

 

Aria-haspopup(property)

Aria-haspopup attribute is not going to be global attribute anymore and it is allowed only in the certain roles.

 

Aria-expanded(state)

There are significant changes to aria-expanded attribute in terms of which role should allow and which role should not. Aria-expanded attribute is going to be allowed in the menuitem role, checkbox role and application role. In addition, aria-expanded attribute is not going to be allowed on many roles(such as alert, alert dialog, article, main, banner, contentinfo, and so on.)

 

Listbox(role)

Group role has been added as child of listbox role

 

The role(s) that is probably going to be deprecated

Directory

Directory role is going to be deprecated

 

Minor changes that are probably going to take place on the existing roles and attributes

  • The below roles are not going to have any default value(aria-checked)
    • Checkbox
    • Menuitemcheckbox
    • Menuitemradio
    • Switch
  •  

  • Checkbox role is going to support aria-required property
  • List role is not going to allow group role as it’s children
  • Row role in the context of treegrid is going to allow aria-positionset and aria-setsize attributes
  • Math role is going to allow children
  • Grid role is not going to allow aria-level as it’s supported attribute
  • Aria-valuemin and aria-valuemax are going to supported attributes for the below roles instead of required attributes
    • Separator
    • Slider
    • Scrollbar
  • Aria-orientation is going to be supported attribute for the scrollbar role instead of required attribute
  • The default value of aria-valuenow attribute for the spinbutton role is going to be 0
  • Spin button role is going to support aria-valuetext attribute
  • Default value of the aria-valuemin and aria-valuemax for spinbutton role is not going to be present
  • Certain roles(such as log, timer, and so on.) are not going to require accessible name

 

 

Editorial changes that are probably going to take place on the below roles and attributes

 

  • Alertdialog role
  • Alert role
  • Rowheader

 

Do you have a feedback on these proposed changes?

ARIA WG opened ARIA 1.2 for the public review around couple of months ago and feedback can be submitted in the W3C ARIA GitHub repository or can be emailed to public-aria@w3.org. ARIA 1.2 is probably going to be come candidate recommendation(CR) in a month or so. Later this year, hoping that it is going to be become W3C recommendation too

References

 

What’s probably coming in the ARIA 1.2?_part1

Overview

ARIA 1.2 main goal is to add certain new roles and update the existing attributes and roles usage based on the feedback that ARIA WG received. In addition, New terminologies like prohibited states and prohibited properties have been introduced. Prohibited states and prohibited properties are nothing but those attributes are not allowed for the certain roles. To give an example, paragraph role(which is new role in the ARIA 1.2) does not allow aria-label and aria-labelledby attributes and this means that authors must not use aria-label and aria-labelledby role on the paragraph role. ARIA 1.2 specification is currently in the draft stage and This means that ARIA 1.2 specification may subject to change based on the feedback. ARIA WG opened ARIA 1.2 for the public review around couple of months ago and feedback can be submitted in the W3C ARIA GitHub repository or can be emailed to public-aria@w3.org. ARIA 1.2 is probably going to be come candidate recommendation(CR) in a month or so. Later this year, hoping that it is going to be become W3C recommendation too. A big kudos to ARIA working group for working so hard for the evolution of ARIA and making the web better place for everyone!

 

New roles that are probably going to come in the ARIA 1.2

 

There are bunch of new roles that are probably going to come in the ARIA 1.2 and let us look into them one by one briefly. of Course, we will discuss them one by one in detail in the future once ARIA 1.2 becomes W3C recommendation

Blockquote

Blockquote role(role=”blockquote”) is related to HTML <blockquote> tag and authors can use this role on content that is quoted from the different source.

 

Caption

Caption role(role=”caption”) is related to HTML <caption> tag and HTML <figcaption> tag and authors can use this role to name/describe the table, grid, and figure. Caption role prohibits aria-label and aria-labelled by attributes.

 

Code

Code role(role=”code”) is related to HTML <code> tag and authors can use this role on the container that has the piece of the computer code. When assistive technologies like screen reader detects code role then screen readers are supposed to read all the punctuations. Code role prohibits aria-label and aria-labelled by attributes.

 

Deletion

Deletion role(role=”deletion”) is related to HTML <del> tag and authors can use this role either on the content that has been deleted or on the content that has been recommended for the deletion. Deletion role prohibits aria-label and aria-labelled by attributes.

 

Insertion

Insertion role(role=”insertion”) is related to HTML <ins> tag and authors can use this role either on the content that has been inserted into the document or on the content that has been recommended for the insertion. Insertion role prohibits aria-label and aria-labelled by attributes.

 

Meter

Meter role(role=”meter”) is related to HTML <meter> tag and authors can use this role on the element that has the scalar measurement within the known range or fractional value. Meter role and progressbar role cannot be used interchangeably and both are for the different purposes.

 

Paragraph

Paragraph role(role=”paragraph”) is related to HTML <p> tag and author can use this role on the content that is paragraph. Paragraph role prohibits aria-label and aria-labelled by attributes.

 

Subscript

Subscript role(role=”subscript”) is related to HTML <sub> tag and authors can use this role for the any meaningful text(not for the presentation purpose) that appears half a character below the normal line. Subscript role can be used for the chemical formulas like o2(oxygen). Subscript role prohibits aria-label and aria-labelled by attributes.

 

Superscript

Superscript(role=”superscript”) role is related to HTML <sup> tag and authors can use this role for the any meaningful text(not for the presentation purpose) that appears half a character above the normal line. Superscript role can be used for the footnotes. Superscript role prohibits aria-label and aria-labelled by attributes.

 

Time

Time role(role=”time”) is related to HTML <time> tag and authors can use this role on the content that represents the time/date.

 

Emphasis

Emphasis role(role=”emphasis”) is related to HTML <em> tag and authors can use this role on the any meaningful text(not for the presentation purpose) that is emphasized, but not on the text that is conveying importance. Emphasis role prohibits aria-label and aria-labelled by attributes.

 

Strong

Strong role(role=”strong”) is related to HTML <strong> tag and authors can use this role on the any meaningful text(not just for the presentation purpose)  that conveys importance/urgency/seriousness , but not on the text that is emphasized. Strong role prohibits aria-label and aria-labelled by attributes.

 

Generic

Generic role(role=”generic”) is related to HTML <div> tag and HTML <span> tag and this role is for the implementers of user agents but not for the authors. Implementers of user agents pass the generic role for those containers that do not have name and that do not have semantics to prevent the accessibility tree structure from the malware. Generic role prohibits aria-label and aria-labelled by attributes.

Just wait and take little bit break!

This is the series of the blog post and we pretty much covered the new roles that are probably going to come in ARIA 1.2 in this part1 blog post. To know what changes that are probably going to take place on the existing attributes and roles usage, head on to  part2(What’s probably coming in the ARIA 1.2?_part2)blog post

 

References

 

HTML address element accessibility

Description

HTML <address> element is introduced way back in the HTML 3. As per the HTML living standard, address element is to be used to provide the contact information for author/owner of document or article. For example, when added to an article, the address element provides contact information for the article author, and when added to a web page footer the address identifies contact information for the web page owner.

Contact information can be email address, physical location, website address, phone number. Address block cannot be used for arbitrary addresses and this is better explained in the author notes section of this blog post. As this is the standard, it is common that authors tend to use address element for such purposes. When author uses address element for such purposes then they may think it provides certain semantical information to assistive technology users. unfortunately, however, it is not the case and no screen readers provide semantical information to the users as of now. On other hand, voice over on iPhone/mac conveys as content information landmark semantics when address tag is used, and this is completely incorrect announcement/semantics. The bug is already filed on the same in the voice over WebKit Bugzilla.

Having said that, what announcement/semantics need to convey to the screen reader users when developer uses address tag. Answer is I don’t know. I am probably thinking that screen readers provide additional verbose like address along with the actual address whenever address block is used by developer. Since address block is not really adding any meaning to the assistive technology users and on top of that, it is creating problem to the voice over users, authors might think that it is not useful and may avoid using this all together. However, I am completely against to this. I would suggest that  authors need to add the address tag as per the standards to avoid the unknown complications and do certain work around(like add presentational role) for the voice over users to provide the best experience.

Author notes

  • <address> element should be used for the contact information relevant to the current site, page, document, section, or article. It should not be used to identify addresses in any other context.
  • Author should not include a postal address in the address block if it is NOT contact information. So, for example, if you have a real estate website, and you’re listing information about available houses, the address of a house listing should not be in the address block

Sample code snippet

  <address>

    You can contact author at <a href=”http://www.sumandamera.com/contact”>

    www.sumandamera.com</a>.<br>

    If you see any issues , please <a href=”mailto: sumandaa@gmail.com”>

    Email us</a>.<br>

    You may also want to visit us:<br>

    Suman Damera Pvt Ltd<br>

Nizampet<br>

        Hyderabad, , Telangana, 500090<br>

India

  </address>

Complementary info on <address> element

There is a reason why voice over is announcing <address> element as content info. The reason is that <address> element is mapped to ARIA content info landmark in the past in the  HTML AAM and therefore, apple treated this as content info landmark. To know more about this, please visit  HTML AAM GitHub. Later, HTML AAM for <address> element is updated with none of ARIA roles. To know more about this, please visit HTML AAM <address> element latest specification/edition.

References

HTML living standard: address element

aria-atomic(property)

Description

We discussed about live regions(aria-live) in the past and this post also related to the live region itself. Before we understand aria-atomic, let me just recap what is the live region all about. When parts or portion of the web page gets updated without reloading the entire page and that portion of page is set to aria-live then those areas are called as live regions. To simplify further, whatever the changes that are happening to the element/container that has aria-live with appropriate token values(assertive/polite) are going to be communicated/notified to the screen reader users. However, here is the tricky thing. The underlying fact with aria-live with assertive/polite token values is that aria-live just notifies changes alone, but not the entire content that is present in the live region. You might be thinking that What is the big deal if entire content in the live region is not communicated to the screen reader users. Let me explain this with simple example. I think most of us do shopping on the ecommerce website for one or other things these days. While doing shopping on the ecommerce site, it is common that, whatever the products that we like, we add to the cart. As soon as the product gets added to the cart, it is obvious for the visual users that product has been added to the cart. To communicate the same to the screen reader users, we set aria-live to assertive/polite for the dynamic container. Do you think aria-live alone with assertive/polite is going to solve the purpose? Answer is not to the full extent. The reason is that the changed content of the dynamic container is going to be communicated to the screen reader users when live region is set but entire  content in the dynamic container is not going to be communicated. This may create some problems for the users in understanding the live updates. Let us understand what problem we are going to face. When product gets added to the cart then screen readers notify the live updates like “1” or “2” or “3” or something like that. Do you think this type of notification is understandable? Answer is no. to make same notification understandable, screen reader should reread the entire content in the live region live “your basket contains 1” or “your basket contains 2” or “your basket contains 3” or something like that. To reread the entire content in the live region as and when user activates add to cart, aria-live alone is not going to help, and this is kind of problem.

To address this problem, aria introduces aria-atomic attribute. Aria-atomic indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute(We will discuss about aria-relevant attribute in the future blog posts). To put this  simpler, when aria-atomic is set to true for the same shopping cart live region and product gets added to the cart then screen readers reread the entire content like “your basket contains 1” or “your basket contains 2” or something like that. This kind of announcement is pretty much understandable instead of just announcing like “1” or “2” when user activates add to cart element. Aria-atomic attribute accepts 2 values and they are true and false.

Author notes

  • Aria-live can be used on any base markup and it is the global attribute
  • The default value of aria-atomic is false for all elements
  • Authors need to set the value of aria-atomic as true only  when the entire content in the live region along with the label of the live region(if exists) needs to be reread by assistive technologies.
  • If author sets explicitly aria-atomic as false, then assistive technologies stop searching up ancestor chain and present the changed node to the user
  • If author does not set aria-atomic attribute itself in the live region then assistive technologies, consider the default value of aria-atomic as false and present the changed node to the user.

Sample code snippet

<h2>Basket summary</h2>

<div aria-live=”assertive” aria-atomic=”true”>

    <p>Your basket contains <span id=”quantity”>0</span> items.</p>

</div>

References

aria-live(property)

Description

In this modern web, it is very common to have dynamic updates/changes on the web. If you are wondering what the dynamic changes on the web is then here is the explanation. Dynamic changes are nothing, but the parts or portion of the web page gets updated without reloading the entire page and it is as simple as that. The examples could be chat log, stock ticker, cricket score board, ticket’s price list, search result on the fly, and so on. That said, When the dynamic changes/updates take place on the web then it is visually apparent that something is going on. However, same may or may not be communicated to the screen reader users as screen reader users can interact with only one part of the page at a time and they may not aware of the changes that are taking place at the other part of the page. If the update about the changes is not communicated/notified to the assistive technology users, then it is going to be nightmare for the users. It is important that authors need to communicate/notify these changes to screen reader users to make sure that users of screen reader are not lost on the web page.

ARIA introduces aria-live attribute or live roles to communicate/notify these dynamic changes to the screen reader users without moving their focus. Let us discuss more about aria-live in this post. Aria-live Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. To put it simpler, as soon as we set aria-live on any HTML container, the HTML container becomes live region. whatever the changes that are taking place in this container, assistive technologies will notify those changes to the users based on the value of the aria-live that we have set. The value of aria-live attribute is token and it accepts 3 values. The accepted values of aria-live are assertive, polite, and off, and will discuss in-details of purpose of all these values in the author notes section of this post.

Author notes

  • Aria-live can be used on any base markup and it is the global attribute
  • The default value of aria-live is off for all elements
  • Authors need to set the value of aria-live as assertive(aria-live=”assertive”) only if the updates are critical(like user name and password are incorrect). The reason is that assertive value interrupts the user’s current task and notify the updates immediately
  • Authors need to set the value of aria-live as polite(aria-live=”polite”) only if the updates need to be notified by assistive technology at the next graceful opportunity. The reason is that polite value does not interrupts the user’s current task and notify the updates at the next graceful opportunity, such as at the end of speaking the current sentence or when the user pauses typing.
  • Authors need to set the value of aria-live as off(aria-live=”off”) when the updates need not to be notified to the assistive technology users
  • Authors sometimes use hidden live regions to notify the important updates to the screen reader users. It is important to remember that these hidden live regions must be removed from the DOM as soon as the purpose is accomplished. Failing to do so results the screen readers to read the same live region content in the browse mode/reading mode without any context and this creates confusion to the users like why that text is present and so on.
  • if multiple changes to a live region should be spoken as a single unit of speech then follow the below steps
    • apply aria-busy at the start of updates to the region
    • perform necessary updates
    • remove aria-busy (or set to false) at the end of updates
  • For robust support, it is advised to include aria-live always in the initial markup itself but do not add the aria-live container dynamically with the script. Even author wants to add aria-live container dynamically to the DOM with the script(better to avoid this approach as much as possible), it is important to maintain some time delay to insert the dynamic message in the dynamic container for screen readers to pick this dynamic message.

    Do not do this:

    <div class=”will-change”>

      <!—both live container and content within the live container will be updated with Javascript –>

    </div>

    <script>

    document.querySelector(“.will-change”).setAttribute(“aria-live”, “polite”);

    document.querySelector(“.will-change”).textContent = “New content!”;

    </script>

    Instead, Do this:

    <div aria-live=”polite” class=”will-change”>

        <!– content will be updated with Javascript –>

    </div>

    <script>

    document.querySelector(“.will-change”).textContent = “New content!”;

    </script>

Sample code snippet

Here are sample code snippets for all the 3 different values

<h1>Polite</h1>

<button onclick=”updateContent(‘msg’)”>To view the updates, click this button!</button>

<br/> <br/>

<div id=”msg” role=”region” aria-live=”polite” id=”msg”></div>

<h1>Assertive</h1>

<button onclick=”updateContent(‘msg2’)”>To view the updates immediately, click this button!</button>

<br/> <br/>

<div id=”msg2″ role=”region” aria-live=”assertive”  id=”msg”></div>

<h1>Off</h1>

<button onclick=”updateContent(‘msg3’)”>No updates will be announced, so don’t click this button 😂!</button>

<br/> <br/>

<div id=”msg3″ role=”region” aria-live=”off” id=”msg”></div>

Complementary info on aria-live

authors sometimes use CSS attributes(from display:none to display:block and vice-versa) to show and hide the dynamic message in the live container in order to notify the message to the screen reader users. However, this may not work as expected in some of the screen readers. It is better to use script to inject the dynamic message in the aria-live container in order to get robust support in most of the screen readers.

References

WAI ARIA1.1 specification: aria-live(property)