-
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
ARIAMixin has many integer attributes with string types and uses DOMString? incorrectly #1110
Comments
If we do this (we probably should), then a choice needs to be made for each one, between the different types of reflection:
Probably don't consider the |
I have a vague memory of discussing this and concluding that string reflection was the way to go, but I don't remember any details. @cookiecrook may remember? |
Listing out non-string types per the ARIA value types (not including token types or true/false/undefined):
The true/false ones are interesting, since they're almost but not quite boolean. |
From Domenic It sounded like there was a preference for true/false values to be enumerated values so they can be extended in the future. I kinda wish they would not have used true and false as values then, but so be it. So those probably have to remain strings, though limited to known values would be nice. HTML's colSpan and rowSpan are unsigned long and colSpan there also has to be at least 1, whereas rowSpan is at least 0. I don't really know the background. (It seems HTML uses |
Chatting with @cookiecrook about this just now - he is going to do some research and try to remember why we went with string reflection originally. |
Initial experimentation was in AOM threads. More meaty, long history thread inside ARIA tracker starts here: Most relevant comment is this one: Excerpt:
And we pulled a few more IDL props prior to shipping ARIA 1.2 to make way for element reflection. |
Why is And reflection of double to string is defined in HTML and used by a large number of features. The rationale given doesn't seem like a good reason to establish a new API pattern. |
There is no reflection for nullable long defined in HTML. Instead, when the attribute is not present, a default value is used. (Usually 0 or -1.) I agree that ARIA sticking to that would be better than inventing a new convention. |
As I mentioned on IRC, there's no nullable string for reflection either (other than for enumerated attributes), so if that's the argument I'm confused. |
@domenic wrote:
Sticking to what would be better? String reflection as-is? |
No, sorry, sticking to using default values (like 0 or -1), like all other reflected numeric HTML attributes do. |
Ok then, let's work out the edge cases.
|
|
Okay. I recall there were some cases where the existence of the ARIA attribute would "win" over the native, non-nullable boolean, but even if I recall that correctly, I suppose we could set those instances as true/false/undefined enumerables rather than true/false booleans. I think that may resolve any conflict. |
Also, authors may be confused that they'd need to use boolean values to set some DOM properties, and boolean-like strings for others. el.ariaModal = true;
el.ariaInvalid = "true"; Presumably this is the fault of ARIA's value patterns, not IDL, but the change from DOMString to other values makes the author confusion more likely. |
Yeah, that's unfortunate, but I don't see any way around it. There are two different syntaxes used on the HTML side, (Note that this is all off-topic. This issue is discussing integer attributes. I mention this because other threads where these things have been discussed previously have more context.) |
Note: I meant |
Oh, in that case, I think they would both use |
I don't think it's off topic. If the ARIA WG decides to reflect as something other than |
In that case, are you saying we'd need an enumerated boolean: "true"/"false" in addition to the tristate "true"/"false"/"undefined"? |
Correct. |
Thanks @domenic. @jnurthen @joanmarie Should we discuss these changes in the Thursday ARIA call? |
@domenic and @annevk thanks for your help on this. @sinabahram reminded me yesterday that there are few numeric attributes where the absence of the attribute is meaningful. For example, a progress bar without <div role="progressbar" aria-valuemin="0" aria-valuemax="100">
<!-- [sic, no aria-valuenow] -->
</div> Can you advise if it's possible to define |
This does not address most of the issues described in w3c#1110, but does provide a better base for ElementInternals support and tackling the issues in w3c#1110. Corresponding HTML change: whatwg/html#8496.
Other changes: * Remove reflection of unrestricted double as it is buggy and unused. * The DOMString getter steps did not account for a missing attribute. * The native accessibility semantics map was renamed to the internal content attribute map as it's now a more general reflection concept. Corresponding ARIA PR: w3c/aria#1876. Fixes #8442. Follow-up: * w3c/core-aam#152 * w3c/aria#1110 * #3238 * #8544 * #8545 * #8926 * #8927 * #8928 * #8930
Added Agenda label so @annevk could join to discuss. Perhaps next week, March 9th at 10 AM Pacific? |
Discussed in ARIA working group meeting: https://www.w3.org/2023/03/09-aria-minutes#t02 |
Based on the ARIA notes and today's AOM discussion, it sounds like the conclusion is that UAs might move forward with the breaking change of changing the types for the existing ARIA reflected properties. Just to make my position clear: this sounds fine to me, as long as we have enough of a heads-up in advance and are able to feature-detect the new behavior (which seems possible). This allows us to either 1) tweak our polyfill to preserve the old behavior, or 2) proactively notify customers of a potential breakage. /cc @gregwhitworth |
Gecko shipped reflection recently in 119 to match the shipping behavior of WebKit and Chromium, which makes a breaking change a little less desirable. Agenda+? It's still failing most WPT tests in 120 though... |
Gecko shipped ARIA reflection for non-idref attributes. We did not ship element reflection though, which is why those tests are failing. |
Yes, sorry. Gecko is passing all non-element reflection tests, here: https://wpt.fyi/results/html/dom/aria-attribute-reflection.html?label=master&label=experimental&aligned&q=label%3Aaccessibility |
I guess if we decide not to improve this, we still need to reconcile with HTML's reflect mechanism somehow as what's currently in the specification doesn't add up. And if we add a new ARIA attribute, we should be really deliberate about whether we should improve the setup from then on or not. |
I've opened whatwg/html#10037 to discuss the remaining fixes on the HTML side. It looks like from the discussion over here ("I guess if we decide not to improve this") the current proposal is to not change any of the currently-shipped behaviors, which is my proposal 1A or 1B? |
Discussed briefly in the ARIA working group: https://www.w3.org/2024/01/11-aria-minutes#t07 thanks @domenic ! |
Also discussed in today's working group meeting: https://www.w3.org/2024/03/07-aria-minutes.html#t08 |
@keithamus Removing myself as an assignee on this one but happy to help in any way! |
It would be nicer if these were reflected as numbers. E.g., aria-level.
cc @alice @domenic
The text was updated successfully, but these errors were encountered: