FreedomScientific / standards-support

Contains documentation for Vispero software support of Web standards
https://freedomscientific.github.io/standards-support/
GNU General Public License v3.0
105 stars 11 forks source link

"selected" is read on every treeitem #824

Open dimovpetar opened 2 months ago

dimovpetar commented 2 months ago

Summary

  1. Go to https://www.w3.org/WAI/ARIA/apg/patterns/treeview/examples/treeview-navigation/#ex_label
  2. Navigate in the tree using the arrow keys

Expected result

Only the first tree item is announced as "selected"

Actual result

Every tree item is announced as "selected"

Example

https://www.w3.org/WAI/ARIA/apg/patterns/treeview/examples/treeview-navigation/#ex_label

Additional Information

JAWS version and build number

JAWS 2023.2307.37

Operating System and version

Windows 11

Browser and version:

Google Chrome 123

JAWS-test commented 2 months ago

Problem also occurs with JAWS 2024.

In my opinion, however, this is not a JAWS problem. This is because the focussed list entry is automatically the selected one. In this respect, the output is correct.

The entry that refers to the current page is marked with aria-current=page and this is also output correctly by JAWS.

A ticket could be set up with ARIA APG so that you can modify their example: All entries should marked with aria-selected=false except for the entry that refers to the current page: This should marked with aria-selected=true instead of aria-current. The output would then be better.

JAWS-test commented 2 months ago

If the status selected is not output, other users complain, see: https://github.com/FreedomScientific/standards-support/issues/733

GerganaKremenska commented 2 months ago

Hello @JAWS-test,

I do not agree that this is not a JAWS issue, as in the accessibility tree of the Chrome devs tools by default all "treeiterms" are "selected:false", why do we need to pollute the html with default values. Screenshot 2024-04-22 at 13 57 40

"This should marked with aria-selected=true instead of aria-current." This contrdictes the wia aria-aria-1.2, which states : "In some use cases for widgets that support aria-selected, current and selected can have different meanings and can both be used within the same set of elements. For example, aria-current="page" can be used in a navigation tree to indicate which page is currently displayed, while aria-selected="true" indicates which page will be displayed if the user activates the treeitem. Furthermore, the same tree may support operating on one or more selected pages (treeitems) by way of a context menu containing options such as "delete" and "move.""

I my opinion aria attributes should not be added, to fix a ccurrent issue.

Best Regards, Gergana

JAWS-test commented 2 months ago

https://www.w3.org/TR/wai-aria-1.3/#aria-selected:

The option, tab, and treeitem roles permit user agents to provide an implicit value for aria-selected when specified conditions are met. User agents MUST NOT provide an implicit value for aria-selected in any other circumstance.

https://www.w3.org/TR/wai-aria-1.3/#option

In certain conditions, a user agent MAY provide an implicit value for aria-selected for each option in a listbox, and if it does, the user agent MUST ensure the following conditions are met before providing an implicit value:

The value of aria-multiselectable on the listbox is false or undefined. None of the option elements in the listbox have an explicitly declared value for aria-selected or aria-checked.

If a user agent provides an implicit aria-selected value for an option, the value SHOULD be true if the option has DOM focus or the listbox has DOM focus and the option is referenced by aria-activedescendant. Otherwise, if a user agent provides an implicit aria-selected value for an option, the value SHOULD be false.

sai-tej commented 21 hours ago

@JAWS-test May I please know if you're actively looking into this issue? We see different behaviour between NVDA and JAWS for the same problem.

stevefaulkner commented 20 hours ago

@sai-tej although @JAWS-test is a valued contributor, he does not work for Freedom Scientific, the best person to ask is @BrettLewisVispero