Bug 165842 - AX: Consider implementing @aria-details.
Summary: AX: Consider implementing @aria-details.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Andres Gonzalez
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-12-13 23:36 PST by James Craig
Modified: 2021-03-25 16:35 PDT (History)
10 users (show)

See Also:


Attachments
Patch (18.50 KB, patch)
2021-03-25 12:34 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff
Patch (18.54 KB, patch)
2021-03-25 13:37 PDT, Andres Gonzalez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2016-12-13 23:36:37 PST
Consider implementing @aria-details.
https://www.w3.org/TR/wai-aria-1.1/#aria-details

I'm not fully convinced of the utility, b/c it's more or less an on-page versus of @longdesc, and the examples included seem pretty trivial (image followed by a section describing the image). 

If someone were to present a more compelling use case, or if it starts getting wider adoption, we should pick it up. Implementation would likely just be a navigation or link action from the current element to the related details element.
Comment 1 Radar WebKit Bug Importer 2017-02-26 17:07:48 PST
<rdar://problem/30725491>
Comment 2 James Craig 2019-09-26 11:28:16 PDT
@aaronlev has posted the most compelling use case so far, for annotations in document suites like Google Docs. IMO, this is worth implementing now.
Comment 3 James Craig 2019-09-26 12:10:42 PDT
Related to http://trac.webkit.org/changeset/218809/webkit
Comment 4 Aaron Leventhal 2020-01-13 09:51:55 PST
Note that as part of work on ARIA Annotations, the ARIA spec is being updated to allow aria-details to support multiple ids. See w3c/aria#1136
Comment 5 Aaron Leventhal 2020-01-13 09:56:40 PST
Note the importance of aria-details has increased quite a lot with the ARIA annotations work. Supporting aria-details will be necessary in order to support comments in Google Docs, among other things.

W3C ARIA spec issue: https://github.com/w3c/aria/issues/749
Explainer: https://github.com/aleventhal/aria-annotations

Also, multiple ids are now supported. See https://github.com/w3c/aria/pull/1136
Comment 6 Aaron Leventhal 2020-01-13 10:05:33 PST
Luckily, the changeset pointed to in comment 3 already supports multiple ids.

But, I think it's only supporting ATK and not AX APIs?
Comment 7 Andres Gonzalez 2021-03-25 12:34:25 PDT
Created attachment 424269 [details]
Patch
Comment 8 chris fleizach 2021-03-25 13:10:18 PDT
Comment on attachment 424269 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424269&action=review

> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1873
> +        if (object) {

are we ever going to have a case where we have a nil pointer in the vector? won't adding a nil pointer to a vector crash anyway?
Comment 9 Andres Gonzalez 2021-03-25 13:24:45 PDT
(In reply to chris fleizach from comment #8)
> Comment on attachment 424269 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=424269&action=review
> 
> > Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1873
> > +        if (object) {
> 
> are we ever going to have a case where we have a nil pointer in the vector?
> won't adding a nil pointer to a vector crash anyway?

It is a Vector<RefPtr<>> and it can have null pointers on it. In the current use, it shouldn't have null pointers, but caller can pass null pointers, so I think it is appropriate to check before dereferencing here.
Comment 10 chris fleizach 2021-03-25 13:28:08 PDT
Comment on attachment 424269 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=424269&action=review

>>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1873
>>> +        if (object) {
>> 
>> are we ever going to have a case where we have a nil pointer in the vector? won't adding a nil pointer to a vector crash anyway?
> 
> It is a Vector<RefPtr<>> and it can have null pointers on it. In the current use, it shouldn't have null pointers, but caller can pass null pointers, so I think it is appropriate to check before dereferencing here.

I think we can save some lines of code if we do

if (!object)
   continue;
Comment 11 Andres Gonzalez 2021-03-25 13:37:03 PDT
Created attachment 424276 [details]
Patch
Comment 12 Andres Gonzalez 2021-03-25 13:38:23 PDT
(In reply to chris fleizach from comment #10)
> Comment on attachment 424269 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=424269&action=review
> 
> >>> Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:1873
> >>> +        if (object) {
> >> 
> >> are we ever going to have a case where we have a nil pointer in the vector? won't adding a nil pointer to a vector crash anyway?
> > 
> > It is a Vector<RefPtr<>> and it can have null pointers on it. In the current use, it shouldn't have null pointers, but caller can pass null pointers, so I think it is appropriate to check before dereferencing here.
> 
> I think we can save some lines of code if we do
> 
> if (!object)
>    continue;

Done, agree that is more legible.
Comment 13 EWS 2021-03-25 16:35:26 PDT
Committed r275066: <https://commits.webkit.org/r275066>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 424276 [details].