You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When specifying aria-setsize, authors MUST set the value to an integer equal to the number of items in the set. If the total number of items is unknown, authors SHOULD set the value of aria-setsize to -1.
This seems like bad or at least incomplete advice, the author does not need to pepper their content with aria-setsize="-1". The user agent will already automatically compute the setsize. As long as the DOM has all of the items, the UA can do this. Is the point of aria-setsize="-1" so that the user agent actually doesn't do this?
HTML-AAM (under aria-setsize):
If the author-provided value of aria-setsize is -1, the exposed value should be based on the number of objects in the DOM.
Object Attribute: setsize:value
State: STATE_INDETERMINATE if the author-provided value is -1
See also: Group Position
HTML-AAM (under group positon):
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.
The first part (under aria-setsize) indicates that -1 will cause an automatic computation based on the DOM objects (in which case why do we even have -1 as an option ... in that case the author could have just left it out). The second part (under group position) indicates that -1 will be converted to 1. This seems obviously wrong.
I'm genuinely confused about what aria-setsize="-1" is for.
The text was updated successfully, but these errors were encountered:
What if the items are dynamically loaded though, the UA wouldn't know the total size yet.
I think the -1 is for situations where the items are perhaps in a virtualized list, and where the UI dev isn't the same one who knows about the data or does that part of the app code. Less common these days but def still exists.
What you say makes sense. I guess -1 probably means we don't know how many items there will be but we don't want the UA to count them. However, I don't think the ARIA spec text does a good enough job of explaining this. And the CORE-ARIA mappings seem wrong and conflicting.
ARIA:
This seems like bad or at least incomplete advice, the author does not need to pepper their content with aria-setsize="-1". The user agent will already automatically compute the setsize. As long as the DOM has all of the items, the UA can do this. Is the point of aria-setsize="-1" so that the user agent actually doesn't do this?
HTML-AAM (under aria-setsize):
HTML-AAM (under group positon):
The first part (under aria-setsize) indicates that -1 will cause an automatic computation based on the DOM objects (in which case why do we even have -1 as an option ... in that case the author could have just left it out). The second part (under group position) indicates that -1 will be converted to 1. This seems obviously wrong.
I'm genuinely confused about what aria-setsize="-1" is for.
The text was updated successfully, but these errors were encountered: