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

Inconsistent text for role=spinbutton #642

Closed
ZoeBijl opened this issue Aug 28, 2017 · 4 comments
Closed

Inconsistent text for role=spinbutton #642

ZoeBijl opened this issue Aug 28, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@ZoeBijl
Copy link

ZoeBijl commented Aug 28, 2017

The description for the spinbutton role is a bit inconsistent. This piece of text says that the aria-valuemin and aria-valuemax attributes are not required.

Authors must set the aria-valuenow attribute. Authors should set the aria-valuemin attribute when there is a minimum value, and the aria-valuemax attribute when there is a maximum value. If missing or not a number, the implicit values of these attributes are as follows:

  • The implicit value of aria-valuemin is that there is no minimum value.
  • The implicit value of aria-valuemax is that there is no maximum value.
  • The implicit value of aria-valuenow is 0.

The table that follows this text says:

Characteristic Value
Required States and Properties: aria-valuemax, aria-valuemin, aria-valuenow

My guess is that the table is geared towards implementers and not authors. Authors that read the table might get confused as to whether the listed attributes are required or not.

@mcking65
Copy link
Contributor

Required attributes in the table are authoring requirements. The table and text need to be consistent.

@joanmarie
Copy link
Contributor

I'm open to suggestions. Some things to consider:

  1. There are cases where there is (functionally) no minimum value and/or maximum value. If we change the authors SHOULD to an authors MUST, won't validators spit up when the author does not provide a value because the range is (functionally) boundless?
  2. In cases where there is a known, bound minimum value, authors really need to provide it. Ditto for a known maximum value. To me "really need" means "required."
  3. Some platform accessibility APIs expect (count on) a minimum and maximum value exposed by the user agent. So, again, aria-valuemax and aria-valuemin are really required -- whether the author knows those values or not.

With this in mind: What changes would you make to improve this situation?

@mcking65
Copy link
Contributor

mcking65 commented Aug 31, 2018

@joanmarie commented:

  1. There are cases where there is (functionally) no minimum value and/or maximum value. If we change the authors SHOULD to an authors MUST, won't validators spit up when the author does not provide a value because the range is (functionally) boundless?

We need to accommodate the real world, which means that authors should not have to specify the min and max unless there is a min and max. That means, min and max cannot be required properties.

  1. In cases where there is a known, bound minimum value, authors really need to provide it. Ditto for a known maximum value. To me "really need" means "required."

This is typical territory for "authors SHOULD" throughout the spec ... it is as it should be.

  1. Some platform accessibility APIs expect (count on) a minimum and maximum value exposed by the user agent. So, again, aria-valuemax and aria-valuemin are really required -- whether the author knows those values or not.

Currently, the default value is no min and no max. So, these APIs must have a way of handling situations where min and max are not specified. If they do not, I'd suggest that the APIs are insufficient because they cannot accurately reflect a valid, real-world use case. I'd suggest that bugs be raised against the APIs in that case.

I'm going to address this in a PR along with related issue #797.

mcking65 added a commit that referenced this issue Aug 31, 2018
…th sibling steppers

For issue #797, allow empty spin buttons by:
1. Changing aria-valuenow to supported from required property.
2. Changing prose to author SHOULD from author MUST specify value for aria-valuenow.
3. Adding aria-valuetext as supported property.

For issue #642, allow min and max to be undefined:
1. Change aria-valuemin and aria-valuemax from required to supported properties.
2. Revise prose of paragraph with normative statements.

For issue #812:
1. Change description to clearly state that a text field with sibling buttons outside the spinbutton is permitted.
2. Related editorial change to consolidate keyboard requirements into a single paragraph.
3. Other related editorial revisions for clarity.
jnurthen pushed a commit that referenced this issue Oct 5, 2018
…th sibling steppers (#813)

For issue #797, allow empty spin buttons by:
1. Changing aria-valuenow to supported from required property.
2. Changing prose to author SHOULD from author MUST specify value for aria-valuenow.
3. Adding aria-valuetext as supported property.

For issue #642, allow min and max to be undefined:
1. Change aria-valuemin and aria-valuemax from required to supported properties.
2. Revise prose of paragraph with normative statements.

For issue #812:
1. Change description to clearly state that a text field with sibling buttons outside the spinbutton is permitted.
2. Related editorial change to consolidate keyboard requirements into a single paragraph.
3. Other related editorial revisions for clarity.
@jnurthen jnurthen removed ARIA labels Jan 9, 2019
@jnurthen jnurthen added this to the ARIA 1.2 milestone Jan 11, 2019
@jnurthen
Copy link
Member

I think this can be closed at was covered by #797 and PR #813

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants