Repository navigation
Confirmation of Action: (ariaNotify) general feedback for consideration #187
Description
The following is re-posted with permission from @aleventhal:
I had some thoughts about ariaNotify based on my previous experience in helping to create the properties used by ARIA live regions.
-
Importance: first, the ARIA WG did not want to use an "important" indicator, because it was felt that developers would not know when to use it (or importantly not use it), e.g. developers would always feel that their content was important. We wanted to have something that was more descriptive of what would happen, and ended up on polite/assertive. I'm not saying that we got consistent implementation of polite/assertive in ATs, however.
I think that what we actually wanted was to:- indicate whether the message should interrupt other messages and be fired immediately, or whether it should wait until other messages have completed. A third type, which I think may actually be most common, would be to fold the message into the stream at the point right after an action occurred, not interrupting anything.
- Another thing about the "fold into speech stream" that may be interesting food for thought. At one point (may still be true), Firefox computed an attribute that it exposed when an a11y tree changed, and the change was from a user input event. The idea was that if something could be spoken as part of the stream that occurs when you perform an input, that it's much less jarring (as opposed to random stuff changing based on a timer). Example: the user navigates in a tree view, and another pane updates a help topic. The screen reader could have a heuristic that decides whether to read part of the new help topic after it reads the new tree view item. Because it's part of what you did, I thought it would be helpful to hear it. The user can always interrupt it with the next input event. The opposite might be changes that occur randomly, e.g. from a timer, or say in a collaborative interface where another user changed something.
- indicate whether the message itself can be interrupted. Some messages are so critical, that if the user does not hear the message, they might miss something absolutely vital. This could obviously be abused, so some thought needs to go into it.
I had some more thoughts here, but it didn't have the idea of "fold into the speech stream" order.
- indicate whether the message should interrupt other messages and be fired immediately, or whether it should wait until other messages have completed. A third type, which I think may actually be most common, would be to fold the message into the stream at the point right after an action occurred, not interrupting anything.
-
Earcons. I wonder if it makes sense to try to come up with a semantic list of earcons and let the AT interpret them, and optionally present them with the message, e.g. "bad-entry" might sounds like a bzzt.
-
The name of the API. I wonder if it makes sense to use "aria" in the name. I kind of like it, but I wonder if others will feel that it's a naming collision.
(Thanks for the feedback @aleventhal!)
Activity
travisleithead commentedon Feb 11, 2022
I love the idea of being more explicit about the intentions for when and how to interrupt, combine together, etc. rather than relying on a general sense of assertiveness or politeness and leaving the defintion largely up to implementers.
I also love the 'earcons' idea that could help make a set of common notifications consistent across the user's experience from site to site.
On the name: glad you like it. I appreciate the clear associate with aria, a.k.a., the API is intended for assistive technology use cases. If we change the name, I would still like to preserve some connection to accessibility so that authors don't confuse this for some other kind of general purpose notification API.
aleventhal commentedon Feb 11, 2022
We should also describe how we imagine the Braille interface to work. One of the big problems with live regions is that Braille is not always supported, and when it is, it's not necessarily helpful. For example, I believe in VoiceOver, the live region message shows on the Braille display temporarily and then disappears. There's no way to get it back after it's gone.
Another useful thing might be to explain good/bad uses of this. E.g. should it be used for error messages during form input?
medeaoblongata commentedon Feb 18, 2022
Just a few bullets from me.
document'owns' these notifications, might we not need multiple queues? (e.g. different contexts, different RIAs?).<iframe>and nested content using<object>or<SVG>(possibly from third parties) needed.loaded?jugglinmike commentedon Feb 22, 2022
From the proposal's "Considerations & Open Issues" section:
This doesn't seem like a viable option given the concerns about fingerprinting. If authors are intentionally prevented from learning if/how this information is being consumed, then they can't be expected to integrate it with other platform features.
The considerations behind media playback (e.g. resource loading and decoding capabilities) would tend to complicate this proposal in a way that doesn't seem justified, yet. @brennanyoung's thoughts on semantic icons, above, make so-called "earcons" seem like a more tractable answer. (Thanks also for the reminder about the inaccuracy of that term.)
@aleventhal Do you think this could be mitigated through word choice? To me, the term "priority" seems substantially more likely to communicate the presence of trade-offs.
Reusing the values of the
aria-livecontent attribute value may be an opportunity to improve coherence with the existing platform, both in terms of API and expected behavior:If a richer priority gradient is warranted, then we could still tie in to that convention with enum values:
jugglinmike commentedon Feb 22, 2022
Elsewhere, @zcorpan pointed out how enums are generally discouraged in web API design these days. If the priority and the existing content attribute really are correlated, and if there really is a need for a large gradient of priorities, then another way to "bridge the gap" would be to accept a mixed type: either a number OR
"assertive"OR"polite". The downside is that authors couldn't intuit how the string values related to numeric ones.aleventhal commentedon Feb 24, 2022
@jugglinmike I think we should mitigate the problems with importance, and lack of functionality with polite/assertive, by having some of the options described at the top of this issue:
These are just ideas of what the author could provide:
Maybe we could talk about it on a call sometime.
sartang commentedon Sep 16, 2022
This came up in the following code-review (https://chromium-review.googlesource.com/c/chromium/src/+/3453306):
What should we do for nodes that are not connected to the main document (generally these won't have a representation in the accessibility tree). Simplest example is
document.createElement('div').ariaNotify()