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-setsize when set to -1 should suppress stating the total number of items. #9823

Open
andrii-morozov opened this issue Jun 26, 2019 · 5 comments
Labels
ARIA p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority

Comments

@andrii-morozov
Copy link

Steps to reproduce:

https://codepen.io/anon/pen/OexBwZ
Create the listbox. Set the aria-setsize="-1" for option.

Actual behavior:

States the position of the option in the list. 1 of 4.

Expected behavior:

Doesn't state the position
https://www.w3.org/TR/wai-aria-1.1/#aria-setsize
Based on documentation setting aria-setsize to -1 indicates that amount of items is unknown.

@DrSooom
Copy link

DrSooom commented Jun 29, 2019

@andrii-morozov: Please list all browsers (incl. versions), where this issue occurs, by completely filling out the bug report draft. The NVDA and the Windows version are also missing. Thanks.

@andrii-morozov
Copy link
Author

OS Name Microsoft Windows 10 Enterprise
Version 10.0.17763 Build 17763

Browser
Chrome: Version 75.0.3770.80 (Official Build) (64-bit)
Firefox: 67.0.4 (64-bit

The same problem actually happens with Narrator as well. To be fair documentation is not explaining what behavior screen reader should have in this case though I would expect it to not announce total amount of items.

@Adriani90
Copy link
Collaborator

cc: @jcsteh maybe you have any suggestion here, I think there might be something else that detects the number of elements, not only aria setsize.

@jcsteh
Copy link
Contributor

jcsteh commented May 20, 2020

First, the test case provided typos aria-setsize as aria-sersize, so it shouldn't be used for testing until that is corrected. That said:

As per the spec, the browser calculates the position and number of items in the set when aria-posinset and aria-setsize aren't explicitly set. The spec does note that setsize -1 means unknown, but it's unclear what a browser is supposed to do in that case. Unknown could mean "browser should calculate this from the DOM", although that's probably superfluous given the author could just leave setsize unspecified. There's also this contradiction in the Core AAM

aria-level, aria-posinset, and aria-setsize are all 1-based. When the property is not present or is "0", it indicates the property is not computed or not supported. If any of these properties are specified by the author as either "0" or a negative number, user agents SHOULD use "1" instead.

It's also difficult to know how a screen reader should handle this. If posinset is specified but setsize isn't, what should be said? Just saying "4" isn't going to make any sense to the user.

@joanmarie
Copy link

Agreed that the spec (ARIA + Core-AAM) language should provide more specific and accurate guidance.

Regarding what the screen reader should say, FWIW here's what I landed yesterday in Orca:

  • When the user first enters the list and the setsize is -1, Orca says "List of unknown size" (the normal presentation being "List with i items")
  • When the user moves among items in that same list, Orca says "Item i" (the normal presentation being "i of j")

@seanbudd seanbudd added ARIA p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority labels Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ARIA p4 https://github.com/nvaccess/nvda/blob/master/projectDocs/issues/triage.md#priority
Projects
None yet
Development

No branches or pull requests

6 participants