Closed Bug 301621 Opened 20 years ago Closed 18 years ago

Expose elements with onclick from addEventListener()

Categories

(Core :: Disability Access APIs, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: aaronlev, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(3 files, 3 obsolete files)

We now expose elements with onclick handlers added declaratively via an onclick attribute, but we do not yet expose elements whose onclick was put there via addEventListener() in a script. We should expose those as well.
Blocks: htmla11y
Depends on: 379763
Attachment #263775 - Attachment is obsolete: true
Attachment #263776 - Attachment is obsolete: true
Attachment #263816 - Flags: review? → review?(Olli.Pettay)
Comment on attachment 263816 [details] [diff] [review] Use new nsIEventListenerManager::HasListenersFor() API instead of checking onclick attibute >+ >+PRBool nsAccessibilityUtils::HasListener(nsIContent *aContent, const nsAString& aEventType) >+{ >+ nsCOMPtr<nsPIDOMEventTarget> eventTarget(do_QueryInterface(aContent)); >+ if (!eventTarget) { >+ return PR_FALSE; >+ } nsIContent is nsPIDOMEventTarget so no need to QI. (Not sure if you need null check still)
Attachment #263816 - Flags: review?(Olli.Pettay) → review+
Checked in with QI removal. Thanks for the tip.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Flags: in-testsuite?
This doesn't work for <li> elements with an onclick.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Also removes unnecessary line that clears focusable state on list. The focusable state is now handled correctly in nsAccessible::GetState(), and technically anything can be focusable now, because of tabindex.
Attachment #265705 - Flags: review?(ginn.chen)
Attachment #265705 - Flags: review?(ginn.chen) → review+
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
Tim mentioned that on a site like CNN he is seeing far more onclicks in the virtual buffer than he does with IE and a screen reader.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: