WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
42055
AX: aria-checked not recognized on image map radio buttons
https://bugs.webkit.org/show_bug.cgi?id=42055
Summary
AX: aria-checked not recognized on image map radio buttons
chris fleizach
Reported
2010-07-11 23:59:30 PDT
aria-checked not recognized on image map radio buttons
Attachments
patch
(14.01 KB, patch)
2010-07-12 01:08 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
patch
(13.94 KB, patch)
2010-07-12 01:10 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
Patch
(12.73 KB, patch)
2010-07-13 00:13 PDT
,
chris fleizach
darin
: review+
Details
Formatted Diff
Diff
patch to test against other bots
(22.87 KB, patch)
2010-07-14 01:14 PDT
,
chris fleizach
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
chris fleizach
Comment 1
2010-07-12 01:08:29 PDT
Created
attachment 61195
[details]
patch
chris fleizach
Comment 2
2010-07-12 01:10:34 PDT
Created
attachment 61196
[details]
patch
chris fleizach
Comment 3
2010-07-13 00:13:59 PDT
Created
attachment 61336
[details]
Patch
Darin Adler
Comment 4
2010-07-13 09:50:31 PDT
Comment on
attachment 61336
[details]
Patch
> +void AccessibilityObject::retrieveIntValue(int& result) const
The code from this function should be in the AccessibilityObject::intValue function; a separate function is not helpful here. AccessibilityRenderObject::intValue could just "return AccessibilityObject::intValue()" at the end and get the same result we get the way it's written in the patch. Both functions return 0 if there is no int value, so there's no need for a "don't touch the int" or a boolean result to indicate that there is no intValue. The more roundabout way that makes use the magic number -1 gives the same end result and is unneeded.
> + // If this is an ARIA checkbox or radio, check the aria-checked attribute rather than node()->checked() > + if (isCheckboxOrRadio()) { > + const AtomicString& checked = getAttribute(node(), aria_checkedAttr); > + if (equalIgnoringCase(checked, "true")) > + result = 1; > + else if (equalIgnoringCase(checked, "false")) > + result = 0; > + }
The way I'd write this is by saying that if it's a "real" checkbox or radio we'll never get here, so this simply has the logic correct for when it's an ARIA one. if (isCheckboxOrRadio()) return equalIgnoringCase(getAttribute(node(), aria_checkedAttr), "true"); Now that the node() virtual function is in the AccessibilityObhject class, I think you should do a cleanup pass of static member functions that take Node* and consider whether you can replace them with member functions that do not have a Node* argument. You will need to check that callers do not have some need to pass a different Node*. This would be good for getAttribute and might also apply to one or more of these: anchorElementForNode firstAccessibleObjectFromNode language listMarkerTextForNodeAndPosition renderListItemContainerForNode
> - Node* node() const > + virtual Node* node() const > { > return m_renderer ? m_renderer->node() : 0; > };
There's a stray semicolon here. Also, having this function body in the header doesn't do any good. Typically it's not useful to have virtual functions also inlined. I’m going to say r=me because this patch is OK as-is, but I think it’s straightforward to improve it given my comments above. Also not sure why the Win EWS failed.
chris fleizach
Comment 5
2010-07-14 00:46:04 PDT
(In reply to
comment #4
)
> (From update of
attachment 61336
[details]
) > > +void AccessibilityObject::retrieveIntValue(int& result) const > > The code from this function should be in the AccessibilityObject::intValue function; a separate function is not helpful here. AccessibilityRenderObject::intValue could just "return AccessibilityObject::intValue()" at the end and get the same result we get the way it's written in the patch. Both functions return 0 if there is no int value, so there's no need for a "don't touch the int" or a boolean result to indicate that there is no intValue. The more roundabout way that makes use the magic number -1 gives the same end result and is unneeded. >
Thanks for this good feedback
> Now that the node() virtual function is in the AccessibilityObhject class, I think you should do a cleanup pass of static member functions that take Node* and consider whether you can replace them with member functions that do not have a Node* argument. You will need to check that callers do not have some need to pass a different Node*. This would be good for getAttribute and might also apply to one or more of these: > > anchorElementForNode > firstAccessibleObjectFromNode > language > listMarkerTextForNodeAndPosition > renderListItemContainerForNode >
I was able to change a lot of instances of getAttribute(Node*) to the member function that uses node() implicitly, but there were still some cases where the Node* variant was needed, so I have two variants (one with node, one without) In the list you mentioned, I was only able to change language(). The other ones are pretty tightly tied to having arbitrary nodes passed in
chris fleizach
Comment 6
2010-07-14 01:14:03 PDT
Created
attachment 61479
[details]
patch to test against other bots adding patch after changes from darin's comments so that it can run against the bots
chris fleizach
Comment 7
2010-07-14 15:10:04 PDT
http://trac.webkit.org/changeset/63358
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug