Bug 122104 - [ATK] Expose state of aria-invalid as ATK_STATE_INVALID_ENTRY
Summary: [ATK] Expose state of aria-invalid as ATK_STATE_INVALID_ENTRY
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-09-30 06:35 PDT by Mario Sanchez Prada
Modified: 2013-10-08 03:54 PDT (History)
7 users (show)

See Also:


Attachments
Patch proposal (7.17 KB, patch)
2013-10-03 08:45 PDT, Mario Sanchez Prada
no flags Details | Formatted Diff | Diff
Patch proposal (7.03 KB, patch)
2013-10-04 02:43 PDT, Mario Sanchez Prada
cfleizach: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mario Sanchez Prada 2013-09-30 06:35:07 PDT
Besides exposing the value of aria-invalid as a text attribute (see bug 122015), we need to expose this attribute as well as a state for the given object, by means of ATK_STATE_INVALID_ENTRY
Comment 1 Radar WebKit Bug Importer 2013-09-30 06:36:11 PDT
<rdar://problem/15110696>
Comment 2 Mario Sanchez Prada 2013-09-30 06:47:26 PDT
Depending on bug 122015, since the changes in DRT/WKTR will be based on the patch for that bug
Comment 3 Mario Sanchez Prada 2013-10-03 08:45:48 PDT
Created attachment 213251 [details]
Patch proposal
Comment 4 chris fleizach 2013-10-03 09:50:00 PDT
Comment on attachment 213251 [details]
Patch proposal

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

> Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:729
> +    if (!invalidStatus.isEmpty() && invalidStatus != "false")

invalidStatus should never be empty based on previous patch you submitted

> Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:1045
> +        // If no text attribute was found, just return what the state says.

this comment is not necessary. you're just explaining what the code does rather than why it does it

> Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:1051
> +        if (isInvalidState != (attributeValue != "false"))

this is a little confusing. maybe split this into to two if/if statements for clarity?
Comment 5 Mario Sanchez Prada 2013-10-04 02:43:10 PDT
Created attachment 213346 [details]
Patch proposal

(In reply to comment #4)
> (From update of attachment 213251 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=213251&action=review
> 
> > Source/WebCore/accessibility/atk/WebKitAccessibleWrapperAtk.cpp:729
> > +    if (!invalidStatus.isEmpty() && invalidStatus != "false")
> 
> invalidStatus should never be empty based on previous patch you submitted

Argh... true. Changed it

> > Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:1045
> > +        // If no text attribute was found, just return what the state says.
> 
> this comment is not necessary. you're just explaining what the code does rather than why it does it
> 

Removed

> > Tools/DumpRenderTree/atk/AccessibilityUIElementAtk.cpp:1051
> > +        if (isInvalidState != (attributeValue != "false"))
> 
> this is a little confusing. maybe split this into to two if/if statements for clarity?

I replaced it with this:

    bool isAriaInvalid = attributeValue != "false";
    if (isInvalidState != isAriaInvalid) {
        return JSStringCreateWithCharacters(0, 0);
    }

I guess that way is more clear now.
Comment 6 Mario Sanchez Prada 2013-10-08 03:54:04 PDT
Committed r157096: <http://trac.webkit.org/changeset/157096>