Skip to content

Illustrate how attributes and properties could be distinct concepts #1896

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

annevk
Copy link
Member

@annevk annevk commented Mar 24, 2023

This could be a potential solution to #1895. The idea here would be to define all the ARIA attributes in terms of DOM/HTML types. This example shows what aria-orientation would look like defined as an enumerated attribute.

And then separately define how identically-named ARIA properties end up using those attributes to compute their own state for use by AT.

I think applying this throughout would resolve a lot of ambiguity and would help end up solving the reflect problem as well.

Closes #????

Describe Change Here!

PR tracking

Check these when the relevant issue or PR has been made, OR after you have confirmed the
related change is not necessary (add N/A). Leave unchecked if you are unsure. Read the
Process Document or
Test Overview for more information.

  • Related Core AAM Issue/PR:
  • Related AccName Issue/PR:
  • Related APG Issue/PR:
  • Any other dependent changes?

Implementation tracking

  • "author MUST" tests:
  • "user agent MUST" tests:
  • Browser implementations (link to issue or when done, link to commit):
    • WebKit:
    • Gecko:
    • Blink:
  • Does this need AT implementations?

Preview | Diff

This could be a potential solution to w3c#1895. The idea here would be to define all the ARIA attributes in terms of DOM/HTML types. This example shows what aria-orientation would look like defined as an enumerated attribute.

And then separately define how identically-named ARIA properties end up using those attributes to compute their own state for use by AT.

I think applying this throughout would resolve a lot of ambiguity and would help end up solving the reflect problem as well.
Copy link
Contributor

@cookiecrook cookiecrook left a comment

Choose a reason for hiding this comment

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

Thanks for the start on this @annevk. I'd like to hear @spectranaut and @jnurthen's comments before progressing much further.

Comment on lines +12343 to +12345
<p>The <pref>aria-orientation</pref> attribute's <a>invalid value default</a> and <a>missing value default</a> are the undefined state.

<p class="note">In ARIA 1.1, the default value for <pref>aria-orientation</pref> changed from <code>horizontal</code> to <code>undefined</code>.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

These statements are seemingly in conflict unless we clarify the two different value concepts like "IDL value" and "accessibility internal value" (not particular to this name) ....

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, I was thinking we'd have a general distinction between "attribute" and "property" where the property is what AT computes the value of based on the "attribute". And I guess this note was about the "property" so should be moved a bit and clarified.

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm having trouble wrapping my head around this a bit, even though I do understand the problem you are trying to solve, IDL value/defaults vs "accessibility internal value"/defaults.

maybe we should use "implicit value" for the "Accessibility internal values"/defaults, as that is already what is in the role tables?

Maybe we should introduce some terms definitions in the PR so that it will be easier to understand where we are moving?

Copy link
Contributor

@spectranaut spectranaut Mar 29, 2023

Choose a reason for hiding this comment

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

oh one more thing, because I was just looking at #1894, and noticed here and there @annevk uses the phrase "AT value" or what the "AT computes" -- what we are really talking about here is what the BROWSER computes. The browser provides this "accessibility internal value" to the AT via the accessibility API for the platform: https://w3c.github.io/core-aam/#ariaOrientationHorizontal

Just wanted to make sure you understood that, @annevk :) There is nothing in the ARIA specs that specify what an AT does, only what information the browser passes on to the AT.

Also, I'm realizing, in this new language, the AAMs translate the "accessibility internal value" to the accessibility APIs, which we will also have to make clear, somehow.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was using that to encompass things that the browser specifically does for AT when AT is enabled, which is somewhat separate implementation-wise and also in terms of what we're comfortable exposing. Whereas reflecting is more general and will also function if AT isn't enabled.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, what we'd be talking about is not the default value of the DOM property, where el.ariaOrientation would always return undefined, but something like a new webdriver getter like computedAriaOrientation, or computedAccessibleNode.orientation where the default value on a range could be horizontal

@spectranaut spectranaut requested a review from pkra March 29, 2023 18:36
Copy link
Contributor

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

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

This is definitely editorial, correct?

I really like this direction, though! We just really need to lock down the terms we are using here.

Comment on lines +12343 to +12345
<p>The <pref>aria-orientation</pref> attribute's <a>invalid value default</a> and <a>missing value default</a> are the undefined state.

<p class="note">In ARIA 1.1, the default value for <pref>aria-orientation</pref> changed from <code>horizontal</code> to <code>undefined</code>.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm having trouble wrapping my head around this a bit, even though I do understand the problem you are trying to solve, IDL value/defaults vs "accessibility internal value"/defaults.

maybe we should use "implicit value" for the "Accessibility internal values"/defaults, as that is already what is in the role tables?

Maybe we should introduce some terms definitions in the PR so that it will be easier to understand where we are moving?


<p class="note">In ARIA 1.1, the default value for <pref>aria-orientation</pref> changed from <code>horizontal</code> to <code>undefined</code>.</p>

<p>The state of the <pref>aria-orientation</pref> property of an element <var>element</var> is computed as follows:
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that you added the algorithm the "explicit value" for aria-orientation is in two places, the algorithm and the characteristic/value table for the relevant roles (see https://w3c.github.io/aria/#listbox). Maybe it doesn't need to be in two places? Or maybe for spec understandablity, it should be?

Copy link
Member Author

Choose a reason for hiding this comment

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

You mean "Implicit Value for Role"? Yeah, I think we could remove that if we go down this path.

@spectranaut spectranaut mentioned this pull request Apr 13, 2023
8 tasks
@pkra pkra added this to the ARIA 1.3 milestone Jun 28, 2023
@pkra pkra added the spec:aria label Jun 14, 2024
@pkra pkra removed their request for review January 29, 2025 10:49
@github-project-automation github-project-automation bot moved this to Agenda+ in ARIA Editors Jun 13, 2025
@jnurthen jnurthen moved this from All PRS to Draft in ARIA Normative PR Tracking Jun 13, 2025
@pkra
Copy link
Member

pkra commented Jul 23, 2025

As per editors' call today, asking @spectranaut to make a suggestion on moving this forward.

@pkra pkra moved this from Agenda+ to Blocked in ARIA Editors Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Blocked
Development

Successfully merging this pull request may close these issues.

4 participants