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

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

Merged
merged 8 commits into from Mar 19, 2021

Conversation

MelSumner
Copy link
Contributor

@MelSumner MelSumner commented Oct 6, 2020

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

index.html Outdated Show resolved Hide resolved
@carmacleod
Copy link
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>
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
@MelSumner
Copy link
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!

index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Co-authored-by: Matt King <a11yThinker@Gmail.com>
index.html Outdated Show resolved Hide resolved
index.html Outdated Show resolved Hide resolved
Copy link
Contributor

@carmacleod carmacleod left a comment

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>
Copy link
Contributor

@carmacleod carmacleod left a comment

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.

Copy link
Member

@jnurthen jnurthen left a comment

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
Contributor

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

index.html Outdated Show resolved Hide resolved
@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