-
Notifications
You must be signed in to change notification settings - Fork 125
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
Scrollbar aria-orientation required property? #780
Comments
I'm not sure this is a bug or that the proposed fix is desired. Look at the text here: https://www.w3.org/TR/wai-aria-1.1/#state_property_processing:
aria-orientation is required; not merely supported. |
Why is it required? The prose states clearly
Compare to slider for example which has similar prose and specifies aria-orientation as supported not required. |
Then I think slider is potentially incorrect. Scrollbars (and sliders) move in a particular direction. Depending on the UI, knowing that direction matters. For instance, up/down might only work with vertical scrollbars; left/right might only work with horizontal scrollbars. Which one should a screen reader user guess? How can the AT inform the user what directions are relevant? |
They both have defaults if aria-orientation is not specified. AT should communicate the default in this case. |
Right, I don't think it should be listed as a required ARIA property if it says that scrollbar's have "an implicit aria-orientation value". As @iannightingale said, those seem contradictory. |
So how is this different from the text described here: #780 (comment) |
Yeah, I see your point about default values. |
It also says that missing required ARIA properties "have an implicit neutral value that is not necessarily their default value". That wording confuses me a bit :) |
I think we might want to clarify the paragraph @katiehockman. Because, yeah, it's not the most illuminating. :) Getting back to the opening report and proposed change: If we make aria-orientation a supported (but not required) property of scrollbar (and slider), then won't validators stop flagging its absence as an error? |
Yes, ideally they would stop flagging the absence. It would depend on what the W3C expects browsers to do in situations where the implicit value is correct (ie. the default is "horizontal" and adding an aria-orientation="horizontal" is redundant). If they expect browsers to propagate that implicit value up to the a11y tree, then this shouldn't be listed as required, imo. |
If we're going to make a change, I'd be more comfortable with keeping this as a required property, but changing the implicit value to "undefined". In the case of scrollbars (and sliders), I think directionality matters and is a detail screen readers might wish to present to end users because directionality can be relevant to what keys/gestures are applicable. Because directionality matters, I think that authors need to provide it explicitly, and that failure to do so is (and should be flagged by validators as) an authoring error. That said, because the implicit value is "vertical" screen readers don't know if the author provided the orientation (i.e. the information can be trusted and passed along to end users) or failed to do so (user agents fell back on vertical, hope it's right, might not be though so good luck!). |
Sounds reasonable! We'll see what the W3C ends up deciding. |
@joanmarie if you make this change you will have to change the note in the definition of aria-orientation too
|
@jnurthen Understood. And as was pointed out earlier, the language about supported vs. required is not especially clear. I think the originally-reported issue and subsequent observations are a discussion we need to have with the working group (perhaps today?). For the record, I am willing to consider that I am wrong. :) But as a screen reader developer who doesn't like bogus values, I'm not convinced of that yet. I will live with whatever the group decides, of course. |
5.2.2 Required States and Properties says:
5.2.3 Supported States and Properties says:
With the above definitions, I agree with the original assertion that the specification should not define a default value for a required state or property. With these definitions, we have only two options: make aria-orientation supported rather than required for scrollbar, or leave it required and remove the default value. The only path I see out of this either/or situation is to change the definitions, and I don't think this situation justifies doing that. The lowest risk option is make aria-orientation supported for scrollbar; that will not break existing content that currently is invalid because it does not specify a value for aria-orientation but happens to work because the default value is being provided to users and is correct. Leaving it required and removing the default value has the potential to make some future content better quality because validators will call out when aria-orientation is not set. Depending on what specific browsers do when the value is not specified, this option may or may not impact existing content. Neither of these options is very high risk or high impact. The aria-orientation property is most useful to screen reader users, and screen reader users very, very rarely use scrollbars. Because of the way screen readers work, they are not a very necessary widget. I lean toward leaving aria-orientation required and removing the default value for the scrollbar simply because I do not think there is a clearly good default value and the impact of the change to end users is likely to be minimal or non-existent. This should have no impact on validators because it was already required. It would impact user agents because they should expose it as undefined when not specified. |
Personally I'm in favor of moving this to 'Supported' and not 'Required'. If any attribute has an implicit value, as this one does, there is no need to include the attribute explicitly in the markup because it already has a valid implicit value. If we make this one an exception, it will throw all others into question, and if all of those are made required they will start failing validators all across the web due to this line in the definition of required: "required states and properties that are absent are an author error." So, if left required, we are saying both of these things at the same time, that this value is implicit (meaning explicitly including the attribute is not necessary), and also that this attribute is required and not including it will fail validation because you have to include the attribute in all cases regardless, which is a contradiction. |
@accdc, if we leave it required, we would remove the implicit value, eliminating your objection. As I stated above, I lean toward leaving aria-orientation required and removing the default value for the scrollbar simply because I do not think there is a clearly good default value and the impact of the change to end users is likely to be minimal or non-existent. This should have no impact on validators because it was already required. It would impact user agents because they should expose it as undefined when not specified. |
Discussion during the meeting: Scrollbar and Slider should be treated separately, even if they are technically the same issue, the functional implications are likely different. Resolution with respect to scrollbar is: Leaving it required but removing the implicit default value. Let's do that in a pull request (if it's not already done) and then do a new issue if appropriate for slider. |
Here are a few browser/AT test results which might be helpful
|
covered by #858 |
https://www.w3.org/TR/wai-aria-1.1/#scrollbar
The Scrollbar section states:
However,
aria-orientation
is listed in the "Required States and Properties:" row of the Scrollbar characteristic table, suggesting that it is required and doesn't have an implicit value? These seem incompatible.The text was updated successfully, but these errors were encountered: