Closed Bug 348616 Opened 18 years ago Closed 18 years ago

Fix html <button> accessibles

Categories

(Core :: Disability Access APIs, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

Details

(Keywords: access)

Attachments

(1 file)

HTML <button> should implement AccessibleText because it can have rich text.

Also, trunk currently does not expose the correct role and name for a button it it contains an onclick. That part is a regression and doesn't happen on branch.
1) Make nsHTML4ButtonAccessible inherit from nsHyperTextAccessible, and thus implement nsIAccessibleText
2) Make anything with an onclick become an nsLinkableAccessible (which is an nsHyperTextAccessible but supports the onclick via actions etc.)
3) Fix regression where we were creating an nsLinkableAccessible for a button with an onclick, instead of an nsHTML4ButtonAccessible
Attachment #233596 - Flags: review?(nian.liu)
Comment on attachment 233596 [details] [diff] [review]
Fixes described below (also fixes accessibility of elements with an onclick)

 #endif
            tag == nsAccessibilityAtoms::q) {
-    *aAccessible = new nsHyperTextAccessible(aNode, aWeakShell);
+    return CreateHyperTextAccessible(NS_STATIC_CAST(nsIFrame*, aFrame), aAccessible);
   }
no need case sice para in CreateHyperTextAccessible is nsISupports which is sync with GetInfo

and also do a cast at
     if (content->IsNodeOfType(nsINode::eHTML)) {
       // Interesting HTML container which may have selectable text and/or embedded objects
-      newAcc = new nsHyperTextAccessible(aNode, aWeakShell);
+      CreateHyperTextAccessible(frame, getter_AddRefs(newAcc));
     }

besides that, r=nian
Attachment #233596 - Flags: review?(nian.liu) → review+
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: