Does 2.5.6 Concurrent Input Mechanisms apply to platform accessibility APIs? #3261
-
Here is an example of a button who's functionality works with keyboard, mouse, touch, and pen — but not platform accessibility APIs when run in Firefox or Safari: <button id="btn">Click me by focusing with the keyboard and using SPACE or ENTER</button>
<p id="output"></p> const btn = document.getElementById("btn");
const output = document.getElementById("output");
btn.addEventListener("keyup", (e) => {
if (e.key === " " || e.key === "Enter") {
output.innerText = "Clicked via 'keyup'";
}
});
btn.addEventListener("pointerup", (e) => {
output.innerText = "Clicked via 'pointerup'";
}); If you run this code in Firefox or Safari and attempt to invoke it via a platform accessibility API, like UIA or IA2 on Windows, it does not work because the Behind the scenes, this is because browsers receive the platform accessibility API invocation call, but do not have an equivalent DOM event to fire. Instead, they perform some emulation, usually firing synthetic I'm trying to understand if this scenario violates any WCAG 2.1 SCs. 2.1.1 Keyboard Accessible seems inappropriate given that keyboard interface is defined as "interface used by software to obtain keystroke input". The platform accessibility API's invoke method does not generate any keystroke input. 4.1.2 Name, Role, Value says "...and values that can be set by the user can be programmatically set; and notification of changes to these items is available to user agents, including assistive technologies." Invoking a button doesn't normally meet my understanding of setting a value. There is no notification of changes because the change was never able to be effected. That led me to 2.5.6 Concurrent Input Mechanisms. I think the intent was probably to define input mechanisms as mouse/keyboard/touch/pen, but the term is not specifically defined. So my question: does this scenario fail 2.5.6 because the platform accessibility API's invoke method can be seen as an input mechanism? Does it fail any other SC? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
my take is no, pure platform API calls are not what the SC attempts to cover. only different actual input modalities. incidentally, at least on Windows, SRs generally also send faked key/mouse events exactly to make sure that controls that may have been coded with |
Beta Was this translation helpful? Give feedback.
-
FWIW just testing with Firefox/NVDA, the above works - it fires |
Beta Was this translation helpful? Give feedback.
-
The example can be modified to not work with screen readers like JAWS:
Then the following happens:
This is not a contrived example, I have experienced this in testing. It is clearly a violation for me. You are right though that no SC really covers this. |
Beta Was this translation helpful? Give feedback.
-
I’m coming around to the idea that 4.1.2 is a good fit and intended to apply to this situation.
If my example instead featured an expand/collapse button or accordion pattern, there’s clearly a “state” that must be programmatically settable, it’s even given as an example in the states definition:
I think my simple button example fails 4.1.2 because there’s no programmatic way to trigger the button’s pressed state. |
Beta Was this translation helpful? Give feedback.
I’m coming around to the idea that 4.1.2 is a good fit and intended to apply to this situation.
If my example instead featured an expand/collapse button or accordion pattern, there’s clearly a “state” that must be programmatically settable, it’s even given as an example in the states definition:
I think my simple button example fails 4.1.2 because there’s no programmatic way t…