-
Notifications
You must be signed in to change notification settings - Fork 157
Add browser requirements that support synthetic activation by AT #2806
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
base: secondary-actions
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -10270,7 +10270,9 @@ <h2>Definitions of States and Properties (all aria-* attributes)</h2> | |||||
| <li>Authors MUST NOT define an empty string value (<code>aria-actions=""</code>) on elements that do not have actions.</li> | ||||||
| <li>Authors SHOULD ensure that related actions elements are visible and activatable when the current element has DOM focus.</li> | ||||||
| <li>Authors SHOULD ensure the referencing element has <code>aria-actions=""</code> defined when not focused, if the related action elements do not exist in the DOM until the referencing element receives focus. This allows assistive technologies to surface the existence of actions outside of user interactions that trigger DOM focus.</li> | ||||||
| <li>User Agents SHOULD use the accessible names of elements referenced by <code>aria-actions</code> to determine the names of actions that are exposed in a platform accessibility API.</li> | ||||||
| <li>User Agents MUST use the accessible names of elements referenced by <code>aria-actions</code> to determine the names of actions that are exposed in a platform accessibility API.</li> | ||||||
| <li>User Agents MUST expose actions in the order that references are listed.</li> | ||||||
| <li>User Agents MUST expose an activation path to assistive technologies that performs the activation behavior of an element referenced by aria-actions without executing the default focus-transfer behavior associated with pointer activation.</li> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The big concern here is AT detection. On one hand, yes, there are many ways to detect AT if you are determined to do it. On the other hand, the "Don’t reveal that assistive technologies are being used" web platform design principle makes it incumbent on us to avoid "obvious" exposure. And yet we have a pretty significant user experience issue here, so we're somewhat caught between a rock and a hard place. I guess the question is whether bouncing focus back to the originating element is ultimately any better and whether it causes undesirable AT behaviour that is difficult or impossible for ATs to work around. Alternatively, perhaps browsers could move the focus there and back, but avoid firing accessibility focus events while that's happening. I need to think on how that could be implemented so I can try it out.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If the browser were to automatically move focus back to the referencing element, wouldn't that also create an AT detection path? How would the browser move focus automatically back to the referencing element without interfering with focus movement triggered by the script that is executed when the referenced element is activated? Would it trigger that focus movement before it executes the script triggered by the referenced element? That seems like it would be very complex to do in a reliable way.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Perhaps. Of course, focus can be moved via means other than mouse and AT (e.g. keyboard), but it's true that such means would fire their own events. @smhigley rightly pointed out to me separately that we already have this potential detection path where AT causes focus to move without other input events that would normally trigger that. I still don't think an existing detection path is necessarily an excuse to introduce a new one, but I do agree that these are closely related.
When you click a control, the browser sets focus itself; that's not controlled by script unless script prevents the default event behaviour. If you're talking about the case where a control sets focus itself based on a click event, I don't think we can really handle that, and that would cause problems even if the browser didn't move focus at all for aria-actions. In that case, focus would just end up wherever the script told it to go. If we were to go down the path of bouncing focus back to the origin, I think it would go something like this:
There are some potential problems with suppressing focus events as described in (5) and (8). For example, focusing the action target might fire more events than just a focus event (e.g. caret event) and we're not going to be able to suppress all of those. This is also completely untested, so there might be things I haven't accounted for.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My concern was making sure the "bounce focus back" response that could happen in step 7 can't override a desirable focus change that would be executed by the author's script that responds to the click event in step 3. In step 7, you specified a check to make sure that such a focus change hasn't already happened. If the way that the browser engine runs guarantees that the author script cannot execute a focus change between the time the browser checks the focus location in step 7 and the time the browser initiates a bounce focus back response to that check as part of step 7, then the bounce back response would not be able to interfere with the author's intent.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This statement is difficult to understand. I'd recommend a single clear statement mention the Then specify the focus behavior elsewhere. Probably Core-AAM. The agreed upon approach also doesn't match what you've written here as rigid MUST statements. We agreed to implement the engine-internal focus bounce, and determine if/where there were edge cases. This statement over-constrains that development.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something like this:
Suggested change
|
||||||
| <li>User Agents MUST NOT expose <code>aria-actions</code> if the Author MUST's are not followed.</li> | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
To my knowledge, there's not precedent anywhere in W3C specs for this type of statement. It's not practically enforceable, and I would recommend dropping it altogether. |
||||||
| </ul> | ||||||
| </div> | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is vague... I think you mean in the order of the IDREFs as listed in the aria-actions attribute, but this might also be read as the DOM order of the referenced elements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this should be a SHOULD, not a MUST, IMO.