Skip to content

Updated aria-setsize and aria-posinset to clarify usage for authors - #1332

Merged
jnurthen merged 8 commits into
mainfrom
issue-747
Mar 19, 2021
Merged

Updated aria-setsize and aria-posinset to clarify usage for authors#1332
jnurthen merged 8 commits into
mainfrom
issue-747

Conversation

@MelSumner

@MelSumner MelSumner commented Oct 6, 2020

Copy link
Copy Markdown
Contributor

Resolves #747 by updating prose for aria-setsize and aria-posinset.

Still unresolved- what should UA do if one is defined and not the other?


Preview | Diff

Comment thread index.html Outdated
@carmacleod

Copy link
Copy Markdown
Contributor

Still unresolved- what should UA do if one is defined and not the other?

Good question. Looking through the spec, I see that the section on handling author errors in states and properties says:

In general, user agents do not do much validation of WAI-ARIA properties. User agents MAY do some minor validation on request, such as [...] enforcing things like aria-posinset being within 1 and aria-setsize, inclusive. User agents are not responsible for logical validation, such as the following:
...
6. Determining implicit values of aria-setsize and aria-posinset when they are specified on some but not all the elements of the set.

So whatever we decide to ask User Agents to do regarding fallback for posinset without setsize (and vice-versa) probably needs to stay within the bounds of "MAY do some minor validation". I'm not sure that UA could do much here anyhow, although perhaps...

  • if posinset is specified without setsize, then UA could fallback to aria-setsize=-1 (i.e. unknown size)
  • if setsize is specified without posinset, then UA could fallback to aria-posinset=1 (which would result in AT saying, for example, 1 of 50, 1 of 50, 1 of 50... which is not useful, but it would give the user an idea that "something is messed up" and they would know to ignore the reported position... ;)

Co-authored-by: Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>
Comment thread index.html Outdated
Comment thread index.html Outdated
@cookiecrook
cookiecrook requested a review from mcking65 October 8, 2020 17:37
@MelSumner

Copy link
Copy Markdown
Contributor Author

@jnurthen can we add this one to the next agenda, to get complete clarification on the comments so we can ship this? Thanks!

Comment thread index.html Outdated
Comment thread index.html Outdated
Comment thread index.html Outdated
Comment thread index.html Outdated
Co-authored-by: Matt King <a11yThinker@Gmail.com>
Comment thread index.html Outdated
Comment thread index.html Outdated

@carmacleod carmacleod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @MelSumner !

Giving +1 assuming the 2 suggestions about adding a conditional phrase will be committed, plus the little one-word suggestion about changing 'exposing' to 'specifying' in setsize (was already changed in posinset).

Base automatically changed from master to main January 20, 2021 22:59
MelSumner and others added 3 commits January 28, 2021 12:34
Co-authored-by: Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>
Co-authored-by: Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>
Co-authored-by: Matt King <a11yThinker@Gmail.com>

@carmacleod carmacleod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Thanks @MelSumner - I think this adds clarity.

So, the only normative change is:

If authors specify aria-posinset, authors MUST also specify a value for aria-setsize.

And (correct me if I'm wrong) we didn't require the opposite (i.e. if setsize then must posinset) because we're allowing the UA's to do the posinset calculation if they know the setsize.

I won't hold up the merge for the following, but just wondering if this paragraph needs to be reworded? (Showing the posinset paragraph, but it is similar in setsize except ending in "an explicit indication of set size.")

If all items in a set are present in the document structure, it is not necessary to set this attribute , as the user agent can automatically calculate the set size and position for each item. However, if only a portion of the set is present in the document structure at a given moment, this property is needed to provide an explicit indication of an element's position.

@jnurthen jnurthen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @carmacleod
I think a small change is needed in the aria-posinset definition. Not totally happy with the wording so feel free to modify if something better comes to mind!

from

<p>If all items in a set are present in the document structure, it is not necessary to
set this <a>attribute</a>, as the <a>user agent</a> can automatically calculate the set size and position for each item. 
However, if only a portion of the set is present in the document structure at a given moment, 
this <a>property</a> is needed to provide an explicit indication of an element's position.</p>

to

<p>If all items up to the current item in a set are present in the document structure, it is not necessary to
 set this <a>attribute</a>, as the <a>user agent</a> can automatically calculate the position for these items. 
However, if all previous items in the set are not present in the document structure at a given moment, 
the author MUST set this <a>attribute</a>to provide an explicit indication of an element's position.</p>

@carmacleod

Copy link
Copy Markdown
Contributor

@MelSumner I think if we just put James' suggested change into the aria-posinset definition, then this PR is ready to merge! :)

Comment thread index.html Outdated
@jnurthen
jnurthen merged commit c908c7f into main Mar 19, 2021
jnurthen pushed a commit that referenced this pull request Mar 19, 2021
…1332)

Co-authored-by: Carolyn MacLeod <Carolyn_MacLeod@ca.ibm.com>
Co-authored-by: Matt King <a11yThinker@Gmail.com>
@pkra pkra added this to the ARIA 1.3 milestone Jan 10, 2022
@pkra pkra mentioned this pull request Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add author MUST that if you define setsize you MUST also define posinset.

7 participants