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-selected and aria-checked are not output correctly for trees #432

Closed
kolaps33 opened this issue Sep 1, 2020 · 10 comments
Closed

Aria-selected and aria-checked are not output correctly for trees #432

kolaps33 opened this issue Sep 1, 2020 · 10 comments

Comments

@kolaps33
Copy link

kolaps33 commented Sep 1, 2020

Summary

Aria-selected state is not narrated to the user.

For more and more detailed info please see comment from JAWS below
#432 (comment)

Repro steps:

  1. Navigate to the URL:
    https://fluentsite.z22.web.core.windows.net/maximize/tree-multiselect-example-shorthand/false
  2. Navigate inside the tree and observe the narration of item which can be selected
    Expected: JAWS narrates information about aria-selected state
    Actual: JAWS doesn't narrate anything about "selected" or "not selected" state
    tree-item-aria-selected

Additional Information

JAWS version and build number

2020.20006.12 ILM

Operating System and version

Win 10 Enterprise
10.0.19041 Build 19041

Browser and version:

Chrome
Version 85.0.4183.83 (Official Build) (64-bit)

Comment

Based on the aria aria-selected should be supported or treeitem and option role based on documentation:
https://www.w3.org/TR/wai-aria-1.1/#aria-selected

@JAWS-test
Copy link

JAWS-test commented Sep 1, 2020

The reason is in my opinion, that normally the focused entry is identical to the selected entry, so an additional output of "selected" would be redundant. This is not the case when using aria-multiselectable=true, so this ARIA attribute will output the status of aria-selected correctly.

If this is correct, this is not a JAWS bug, but the examples are incorrectly implemented.

@kolaps33
Copy link
Author

kolaps33 commented Sep 2, 2020

Hi @JAWS-test
I added aria-multiselectable=true into the tree example, because we have been missing it there but JAWS still not narrating information about "selected" or "not selected" state.
Please find updated example on codesandbox:
https://codesandbox.io/s/determined-tu-yv4vw
or you example in new window for easier testing
https://yv4vw.csb.app/

Comment:
When I tried NVDA + Chrome, then NVDA narrate state in the tree about "not selected" state.

@JAWS-test
Copy link

JAWS-test commented Sep 2, 2020

I checked aria-multiselectable on your listbox example, not on the tree example. Your new tree example has no aria-multiselectable in the source code. The status of the checkboxes within the treeitems should be transmitted with aria-checked: https://www.w3.org/TR/wai-aria-1.2/#aria-checked.

See also: w3c/aria#1052 (comment)

@kolaps33
Copy link
Author

kolaps33 commented Sep 3, 2020

Hi @JAWS-test :)
About the tree example, we took usage of "aria-selected" from the site:
https://www.w3.org/TR/wai-aria-practices-1.1/#tree_roles_states_props

if the tree supports multiple selection:
All selected nodes have aria-selected set to true.
All nodes that are selectable but not selected have aria-selected set to false.
If the tree contains nodes that are not selectable, those nodes do not have the aria-selected state.

should JAWS support it as well, when it is official recommendation?

@JAWS-test
Copy link

of course, JAWS should also support aria-selected in trees if multiple selection is possible. This was not the case in your example. If aria-selected in trees with multiple selection is not supported, this is a JAWS bug. In your example, it is still better to use aria-checked instead of aria-selected because only aria-checked allows the value mixed, as your example requires

@JAWS-test
Copy link

Please also note that the ARIA specification regarding attributes and trees is not final and is currently under discussion: w3c/aria#1311

@JAWS-test
Copy link

JAWS-test commented Sep 3, 2020

I have checked the example https://www.w3.org/TR/wai-aria-practices-1.1/examples/treeview/treeview-1/treeview-1a.html with JAWS 2020 and current version of Chrome:

  • aria-selected=true/false is not output in the tree, even if the tree has aria-multiselectable=true. This is a JAWS error
  • aria-checked=true/false is correctly output in the tree
  • aria-checked=mixed is output as "not activated partially activated", which is a JAWS error.

Since the output of listbox is correct, I suggest renaming the issue: "aria-selected and aria-checked are not output correctly for trees"

Note: In the example the attributes aria-selected, aria-checked and aria-multiselectable are missing. I have added them manually.

@kolaps33 kolaps33 changed the title Aria-selected state is not narrated Aria-selected and aria-checked are not output correctly for trees Sep 3, 2020
@kolaps33
Copy link
Author

kolaps33 commented Sep 3, 2020

@JAWS-test thank you very much for clarification and pointing us to the discussion.

I renamed the bug as you suggest.
As well I removed listbox mention from description, in order to avoid confusion.

@elbazitay
Copy link

Hi, there's any estimation when this issue will be closed?

@kolaps33
Copy link
Author

validated with example:
https://www.w3.org/WAI/ARIA/apg/patterns/treeview/examples/treeview-1b/

with JAWS version 2023.2303.144 and I hear JAWS started narration of aria-selected state:

image

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

No branches or pull requests

3 participants