Closed Bug 342035 Opened 18 years ago Closed 18 years ago

Expose all display:block elements via nsIAccessibleText

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, 2 obsolete files)

In bug 340829 we are implementing nsIAccessibleText across all platforms. All elements that are styled with display:block should implement this interfaces, and expose roles such as ROLE_PARAGRAPH, ROLE_HEADING, etc.
Attachment #226175 - Flags: review?(ginn.chen)
Attachment #226175 - Flags: review?(ginn.chen) → review+
Attachment #226175 - Flags: superreview?(roc)
Attachment #226175 - Attachment is obsolete: true
Attachment #226786 - Flags: superreview?(roc)
Attachment #226786 - Flags: review?(ginn.chen)
Attachment #226175 - Flags: superreview?(roc)
Attachment #226786 - Flags: review?(ginn.chen) → review+
Attachment #226786 - Flags: superreview?(roc) → superreview?(neil)
Comment on attachment 226786 [details] [diff] [review]
But don't create for <body> or root element such as <html> or <window>, they are redundant with nsDocAccessible created for doc node

>+    if (mContent->Tag() == nsHTMLAtoms::body || !mContent->GetParent()) {
>+      // Don't create accessible objects for <body> or root content node, they are redundant with
>+      // the nsDocAccessible object created with the document node
Looks OK to me, but do you have to run #ifdef code past a layout peer?
Attachment #226786 - Flags: superreview?(neil) → superreview+
Comment on attachment 226786 [details] [diff] [review]
But don't create for <body> or root element such as <html> or <window>, they are redundant with nsDocAccessible created for doc node

I suppose unless layout peers tell me I don't need to, I will run the #ifdef ACCESSIBILITY code by them.
Attachment #226786 - Flags: review?(dbaron)
+    if (mContent->Tag() == nsHTMLAtoms::body || !mContent->GetParent()) {

It's possible to have body elements that aren't *the* HTML body. You need an additional check like this:

http://lxr.mozilla.org/seamonkey/source/layout/base/nsCSSRendering.cpp#2718

Actually it would be nice to factor that out into a helper nsContentUtils::IsHTMLBody(nsIContent*).
(In reply to comment #5)
> It's possible to have body elements that aren't *the* HTML body. You need an
> additional check like this:
When does that happen?

> Actually it would be nice to factor that out into a helper
> nsContentUtils::IsHTMLBody(nsIContent*).
I'd like to save the refactoring for someone else doing that right now, since at the moment we're in the middle of a huge rewrite of Linux a11y on trunk, and just getting this patch in will help us test.
Status: NEW → ASSIGNED
One improvement is to use SameCOMIdentity instead of an extra QI.
Attachment #228134 - Flags: superreview?(roc)
Attachment #226786 - Attachment is obsolete: true
Attachment #226786 - Flags: review?(dbaron)
(In reply to comment #6)
> (In reply to comment #5)
> > It's possible to have body elements that aren't *the* HTML body. You need
> > an additional check like this:
> When does that happen?

When someone uses the DOM, or XHTML, to create an HTML BODY element and put it in some random place in a document.
Comment on attachment 228134 [details] [diff] [review]
New patch with roc's improved body check

sorry about the delay.
Attachment #228134 - Flags: superreview?(roc) → superreview+
Status: ASSIGNED → 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: