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

Explanation to determine a description is meaningless #77

Closed
JAWS-test opened this issue Feb 20, 2020 · 6 comments
Closed

Explanation to determine a description is meaningless #77

JAWS-test opened this issue Feb 20, 2020 · 6 comments
Milestone

Comments

@JAWS-test
Copy link

JAWS-test commented Feb 20, 2020

The Name computation is clear:

User agents MUST compute an accessible name using the rules outlined below in the section titled Accessible Name and Description Computation.

The Description computation is strange:

If aria-describedby is present, user agents MUST compute the accessible description by concatenating the text alternatives for elements referenced by an aria-describedby attribute on the current element. The text alternatives for the referenced elements are computed using a number of methods, outlined below in the section titled Accessible Name and Description Computation

  • This means that it is currently assumed that a description is only possible via aria-describedby. There are no indications that a description is also possible with title, caption and value and in which order these must be considered
  • In my opinion, all the explanations for determining a description in the Section 4.3 Accessible Name and Description Computation do not make sense, since Section 4.2 clearly states that Section 4.3 is not there to determine a description, but only the text alternative of an element referenced with aria-describedby. Let's take for example the sentence "or, if computing a description, and the current node has an aria-describedby attribute that contains at least one valid IDREF, and the current node is not already part of an aria-describedby traversal...". This doesn't make sense, because we are always already in the aria-describedby traversel at this position. On the other hand, there can be no aria-describedby traversel at all, because for an element to which aria-describedby refers, not the description but the name must be determined. This means that there is at most one traversel of first aria-describedby and then aria-labelledby

I think the simplest solution to the problem would be my proposal in #75 (comment).
Another possibility would be:

  • Change the sentence in Section 4.2 to "User agents MUST compute an accessible description using the rules outlined below in the section titled Accessible Name and Description Computation."
  • Change the Section 4.3:
    • Add at step C: aria-description
    • Add at step D: title, value, caption (with explanation when these elements are used as name and when as description)
@joanmarie joanmarie added this to the 1.2 milestone Feb 20, 2020
@aleventhal
Copy link
Contributor

@JAWS-test, I think section 4.3 should be renamed to Primary Text Computation, or Primary Text Computation for a Subtree, and then be referred by 4.1 Accessible Name Computation and 4.2 Accessible Description Computation. It's too confusing that it's name (Accessible Name and Description Computation) sounds like the others. Also, it should not need to refer to aria-description. It's a recursive algorithm, that can look at all of the nodes in a subtree, but aria-description does not need to be checked on each node. Rather, aria-description needs to be checked in 4.2 if and only if using aria-describedby yields nothing.

@aleventhal
Copy link
Contributor

aleventhal commented Feb 24, 2020

For reference, here's what Chrome's impl does for the description computation. I haven't recently checked it against CORE-AAM etc.:

  1. Use aria-describedby and retrieve the results of the primary text computation for any relevant nodes
  2. Else if no description yet, use aria-description
  3. Else if no description yet, and is an input type="button" , input type="submit" and input type="reset", use the value attribute if it wasn't already used for the name (5.2.2 in HTML-AAM)
  4. Else if no description yet, and is a table element, use the caption (5.9.2 in HTML-AAM)
  5. Else if no description yet, and is a summary element that was not used for the name, use the contents of the summary element (5.6.2 in HTML-AAM)
  6. Else if no description yet, use the title attribute if it wasn't already used in the name
  7. Else no description

@aleventhal
Copy link
Contributor

@JAWS-test , I'm working on a draft that basically does what we're talking about, I think it's a step in the right direction but doesn't solve everything. IMO it's much more readable. Feel free to take a look.
#69

@JAWS-test
Copy link
Author

@aleventhal, many thanks for the comprehensive revision. I think it removes all the ambiguities and errors that were previously contained. In the preview, there is only one problem with the numbering of the list items: instead of letters, numbers are used, so that the references (e.g. "2F.i") no longer work. But maybe this is just a CSS problem of the preview.

@aleventhal
Copy link
Contributor

Thanks @JAWS-test ! I expect that's an issue with the preview. We'll have to ask Michael Cooper before we land. Also, do you mind adding your comments to the pull request? How did you like the table approach?

@pkra
Copy link
Member

pkra commented Jun 27, 2023

I believe this was resolved by #69 (just not automatically closed).

@pkra pkra closed this as completed Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants