Closed Bug 507555 Opened 15 years ago Closed 12 years ago

wrong accessible is created for HTML:li with float and "display: inline" style

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: surkov, Assigned: surkov)

References

(Blocks 1 open bug)

Details

(Keywords: access, Whiteboard: [bk1])

Attachments

(3 files)

Attached file testcase
Investigate attached testcase in DOMi or accProble, HTML:li accessible are exposed with paragraph role, obviously we use nsHyperTextAccessible for them instead of nsHTMLLIAccessible.
More precisely "display: inline; float: left" on HTML:li makes it paragraph accessible.
Summary: wrong accessible is created for HTML:li with float style → wrong accessible is created for HTML:li with float and "display: inline" style
It sounds like regression from bug 346730. This html:li's frame has blockFrame type and hasn't mBullet that's the reason why CreateHTMLAccessibleByMarkup and nsBlockFrame::GetAccessible (http://mxr.mozilla.org/mozilla-central/source/layout/generic/nsBlockFrame.cpp#6339) fails to create nsHTMLLiAccessible.
Depends on: 513662
Blocks: 513662
No longer depends on: 513662
Attached file real test case
comment #1 say that is becomes "role paragraph" with the CSS "float: right"

Updating the html test case to actually do that and exhibit the problem.
Whiteboard: [bk1]
Attached patch patchSplinter Review
create list item accessible for HTML:li unconditionally. If HTML:li gets a block display style (i.e. nsBlockFrame is used) then we didn't create list item accessible. We were needed the nsBlockFrame to create list item accessible because it knew about the bullet, nowadays list item accessible knows about bullet itself, so we can create list item accessible by tag name on a11y side.

We still need nsBlockFrame to create an accessible for elements different than HTML:li but styled as display:list-item.
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #658398 - Flags: review?(trev.saunders)
Blocks: 764757
Comment on attachment 658398 [details] [diff] [review]
patch

>+  if (tag == nsGkAtoms::dt || tag == nsGkAtoms::li) {
>+    // Create list item accessible unconditionally by tag name. For elements
>+    // styled as list item the nsBlockFrame takes care.

nit, ending with "takes care" is weird english.
Attachment #658398 - Flags: review?(trev.saunders) → review+
(In reply to Trevor Saunders (:tbsaunde) from comment #5)
> Comment on attachment 658398 [details] [diff] [review]
> patch
> 
> >+  if (tag == nsGkAtoms::dt || tag == nsGkAtoms::li) {
> >+    // Create list item accessible unconditionally by tag name. For elements
> >+    // styled as list item the nsBlockFrame takes care.
> 
> nit, ending with "takes care" is weird english.

Trev, please suggest options at least for comments concerning english. "takes care" -> "works"?
(In reply to alexander :surkov from comment #6)
> (In reply to Trevor Saunders (:tbsaunde) from comment #5)
> > Comment on attachment 658398 [details] [diff] [review]
> > patch
> > 
> > >+  if (tag == nsGkAtoms::dt || tag == nsGkAtoms::li) {
> > >+    // Create list item accessible unconditionally by tag name. For elements
> > >+    // styled as list item the nsBlockFrame takes care.
> > 
> > nit, ending with "takes care" is weird english.
> 
> Trev, please suggest options at least for comments concerning english.
> "takes care" -> "works"?

sorry, how about "nsBlockFrame creates the list item accessible for other elements styled as list items"?

or may be replace "takes care" by "does this"
(In reply to Trevor Saunders (:tbsaunde) from comment #7)

> sorry, how about "nsBlockFrame creates the list item accessible for other
> elements styled as list items"?

ok, thank you
http://hg.mozilla.org/integration/mozilla-inbound/rev/33a59f79700f
Flags: in-testsuite+
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/33a59f79700f
Status: ASSIGNED → RESOLVED
Closed: 12 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: