Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aria-relevant: find real-world use cases, consider deprecating it #712

Open
aleventhal opened this issue Apr 9, 2018 · 17 comments
Open
Assignees
Labels
Milestone

Comments

@aleventhal
Copy link
Contributor

Does anyone know of any examples of aria-relevant being used in a helpful way in shipping software?

I have concerns about this attribute. The PFWG originally added it to ARIA because theoretically a screen reader should be informed about any changes and be able to receive hints on whether those changes are useful. What happens when a user leaves a chatroom and their name is removed from a sidebar list? It seemed bad to develop a standard where it wasn't even possible to have removals of content be presented.

The default, aria-relevant="additions text" is to speak content being added and text changes. This is by far the most useful value, and I'm not sure any other value has ever been used in real life in a successful way.

For any other value to be useful, we'd need to know that AT/Browser combinations have been tested and provide a useful experience. For example, is a user informed that the element was removed? Or will the screen reader just read the element the same way it would have if the element was added?

I'm pretty skeptical of the real-world value of this attribute and wonder if it's causing more harm than good, as authors may not understand what it does, and implementations may not all treat it the same way. (For example, Mac Chrome and Safari are not treating aria-relevant="text" exactly the same for live changes that use elem.innerHTML to change the text of a node).

Right now, it's almost certain that if an author used this attribute it was because they were confused by its purpose and maybe thought it was a helpful bandaid for fixing a bug, and it probably wasn't.

@aleventhal
Copy link
Contributor Author

It turns out that none of the screen readers I've tested with so far even speak removals when aria-relevant contains removals. I tested VoiceOver, NVDA and JAWS with Safari, Firefox and Chrome.

@devarshipant
Copy link

I got similar results. Wouldn't aria-atomic=true monitor that space where aria-relevant was intended?

@accdc
Copy link
Contributor

accdc commented Apr 11, 2018

That's weird, some years back I wrote the section at
http://whatsock.com/training/#hd25

Which references the example of aria-relevant at
http://whatsock.com/training/demos/lr/aria-live-polite-removals.html

I just ran the example page in IE11 and in Firefox using the latest release of JAWS2018, and removals are indeed being announced in both browsers. I'm using Windows7.

@aleventhal
Copy link
Contributor Author

@devarshipant I'm not sure what you mean. The aria-atomic attribute basically ensures that if something inside an element changes, that the entire region is always spoken for any update, rather than just a part.

@accdc I was able to repro your results with JAWS. The difference in your test case from mine, is that in mine, I remove the actual live region. However, I was not able to hear any removals in NVDA or VoiceOver. Either way, I still think authors should avoid and we should consider deprecating. Any use cases I've heard of can be done better some other way. E.g. why was the buddy name removed from the list, were they banned or quit, or are just unreachable? What's your opinion? FWIW, my colleague and I are planning to publish an article on this today.

@devarshipant
Copy link

@aleventhal:

The aria-atomic attribute basically ensures that if something inside an element changes, that the entire region is always spoken for any update, rather than just a part.

I probably misunderstood then. The ARIA doc seems to suggest that only the changed node is passed on to AT:
...
2. If aria-atomic is explicitly set to false, assistive technologies will stop searching up the ancestor chain and present only the changed node to the user.
3. If aria-atomic is explicitly set to true, assistive technologies will present the entire contents of the element.

It also seems to suggest to use aria-atomic when aria-relevant is present.

"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."

@aleventhal
Copy link
Contributor Author

aleventhal commented Apr 11, 2018 via email

@DavidMacDonald
Copy link

DavidMacDonald commented Apr 14, 2018

I agree with the above about aria-atomic but the spec is a bit confusing think. It says.

traverse the ancestors to find the first element with aria-atomic set,

and later it says.

if aria-atomic is explicitly set to false, assistive technologies will stop searching up the ancestor chain and present only the changed node to the user.

That seems to say something like this should read "Row 14" when it changes from 13 to 14 (but it doesn't in AT)

<div aria-atomic="true">Row: <span aria-live="polite" id="rownum">13</span></div>

https://www.w3.org/TR/wai-aria-1.1/#aria-atomic

I don't think we should say "searching up the ancestor chain" in the explanation of aria-atomic, should we?

Should I file a separate issue, since this is about deprecating aria-relevant?

@devarshipant
Copy link

Should I file a separate issue, since this is about deprecating aria-relevant?

Yes. The spec should also clarify the term "changed node".

Consider the example (Refer to FS training page):

<span id="LiveRegion1" aria-live="polite" aria-atomic="true">
<span id="teams">Tampa Bay Rays: 
<span id="LiveRegion2">6</span>
<br>
Boston Red Sox:&nbsp;&nbsp; 5
</span>

Based on definitions of aria-atomic true and false in the spec, what would AT say in the above example when:

  1. aria-atomic = "true"
  2. aria-atomic = "false"

@Iz-a11y
Copy link

Iz-a11y commented May 8, 2018

The one time I tried to use this property, the lack of browser and/or AT support really scuppered me. I was retrofitting a calculator to add accessibility, and wanted to flag up the change to the calculator's display when the user pressed the "Del" key, so I tried using aria-relevant. But due to the lack of support, I ended up communicating the change in a message that was hidden from everything except screenreaders. This was a last resort for me, as I'd have preferred a clean solution that was supported by browsers and AT, so I would much rather see this property supported than deprecated.

@JamesCatt
Copy link

In terms of a use case, I found it was helpful for providing real-time input validation. For example, if a user is entering their name into a text input, I had a live region for error notifications that would tell them if there was a problem (i.e., too few characters, invalid characters, etc). Once they corrected the problem, the error message would be removed, and having the SR announce this fact to the user was nice.

Granted, it didn't work in all SR + browser combinations due to the poor support, but I kept it in as a progressive enhancement.

@aleventhal
Copy link
Contributor Author

@JamesCatt I think that removing the aria-invalid attribute would arguably be the semantic way to handle that case. Not sure screen readers would handle that though.

Alternatively, a live region announcement, even if a hidden one, that the error message was removed, would work more consistently and could offer a friendlier announcement than what you'd get with aria-relevant .

@JamesCatt
Copy link

JamesCatt commented Nov 9, 2018

@JamesCatt I think that removing the aria-invalid attribute would arguably be the semantic way to handle that case. Not sure screen readers would handle that though.

In this case, simply removing the invalid state doesn't achieve the same effect, since invalid is a binary state--it doesn't provide any information on why the value is invalid. I certainly think it's good to complement the error messages with invalid, but it can't replace them.

To clarify, I'm thinking of a scenario where there are multiple errors on the same field. Another example would be a "choose your password" field, where the password has to meet multiple requirements (length, upper/lower case, numbers, etc). In this case, I found the experience provided by JAWS was perfect, reading out messages like "Removed 'password must contain a number'" as the user fixes the various problems.

Alternatively, a live region announcement, even if a hidden one, that the error message was removed, would work more consistently and could offer a friendlier announcement than what you'd get with aria-relevant .

True, there are alternate means of providing similar functionality. But if you consider the password example, it would be a fair bit more complex to build that than simply relying on aria-relevant. And as I mentioned, I thought that the announcement from JAWS was perfect for the use case. True, future SR implementations may not be consistent, but to me that doesn't seem like a valid argument for deprecation--just about every aria attribute is or has been inconsistent across SRs at some point.

If we were talking about adding a new feature to the spec, I would totally agree with you that simply relying on custom aria-live messages would make more sense--but we're not. The issue here is finding a use case, which I think this qualifies as. All I'm saying is that to me it doesn't make sense to go out of the way to deprecate a feature that is potentially useful and is already supported in the most popular SR on the market.

@jnurthen
Copy link
Member

@jnurthen jnurthen added this to the ARIA 1.3 milestone Nov 29, 2018
@jnurthen jnurthen removed the Agenda label Nov 29, 2018
@jnurthen jnurthen self-assigned this Nov 29, 2018
@jnurthen
Copy link
Member

@jnurthen to work out howe to get more feedback on this.

@JAWS-test
Copy link
Contributor

JAWS-test commented Aug 25, 2019

aria-relevant=removed has been correctly output by JAWS for several years (with the addition: "removed").
I'm afraid I have to correct myself. This only applied to IE 11 and JAWS and certain methods of removal. A thorough test shows that aria-relevant is hardly correctly supported by JAWS in conjunction with IE 11, Chrome and Firefox: FreedomScientific/standards-support#289, FreedomScientific/standards-support#279

I think aria-relevant makes sense.
Make sense for all, removals and default (additions+text), but not for additions only and text only: #1048
An example for aria-relevant=removed, what I read at W3C, was: Person leaves a chat conversation.

@JAWS-test
Copy link
Contributor

JAWS-test commented Aug 25, 2019

@aleventhal:

The difference in your test case from mine, is that in mine, I remove the actual live region. However, I was not able to hear any removals in NVDA or VoiceOver.

Of course, if you remove the live region, nothing will be output. This only works if content within the live region is removed. That's the way it should be. In practice there is divergent behaviour.

@JAWS-test
Copy link
Contributor

After the test with JAWS 2019, the following recommendation can be given on using aria relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants