Last Comment Bug 397485 - Embed characters to children not 1:1
: Embed characters to children not 1:1
Status: RESOLVED FIXED
: access
Product: Core
Classification: Components
Component: Disability Access APIs (show other bugs)
: unspecified
: x86 Linux
: -- normal (vote)
: ---
Assigned To: alexander :surkov
:
: alexander :surkov
Mentors:
Depends on:
Blocks: orca fox3access
  Show dependency treegraph
 
Reported: 2007-09-25 06:48 PDT by Scott Haeger
Modified: 2010-02-19 08:02 PST (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
quick ginn's version (1.38 KB, patch)
2007-11-13 06:48 PST, alexander :surkov
aaronlev: review-
Details | Diff | Splinter Review
patch (2.62 KB, patch)
2007-11-14 06:04 PST, alexander :surkov
aaronlev: review+
mtschrep: approval1.9+
Details | Diff | Splinter Review

Description User image Scott Haeger 2007-09-25 06:48:10 PDT
The slider seen here http://www.mozilla.org/access/dhtml/pretty-slider.htm shows that it has an embed character but has a childCount=0.  This should not occur because embed characters to children should be a 1:1 match.
Comment 2 User image Aaron Leventhal 2007-10-29 14:44:34 PDT
Scott, is this still a problem?
Comment 3 User image Scott Haeger 2007-10-30 06:56:14 PDT
Yes, this is still an issue.  However, Orca now has safe guards for this so it is a low priority item.
Comment 4 User image Ginn Chen 2007-11-06 00:05:27 PST
ROLE_SLIDER is in nsAccessible::MustPrune()
So the childCount is always zero.

Do we want to change that?
Comment 5 User image Ginn Chen 2007-11-06 00:24:51 PST
btw: the child in the slider is <span class "bar">, the moving square bar.
 
Comment 6 User image Aaron Leventhal 2007-11-06 07:16:19 PST
Ginn, we don't want extra image children in a slider. It confuses screen readers like JAWS that have doc browsing modes.

It would be better if MustPrune()==TRUE means that there are no embedded object chars in something, and that it doesn't support nsIAccessibleHyperText.
Comment 7 User image Aaron Leventhal 2007-11-06 07:37:54 PST
Actually I'm not sure, because nsIAccessible does have the children. We'd need the embedded object chars when exposing it there and not when exposing it to ATK. Yuck.
Comment 8 User image Scott Haeger 2007-11-06 08:00:44 PST
Ginn, I am looking at it from an ATK point of view where I am only given a slider object.  It should have no children either in the Accessible::childCount field or as and embed character in the text interface.

I just checked with Accerciser and it is still an issue.  As mentioned earlier, this is no longer a major issue for Orca.
Comment 9 User image Aaron Leventhal 2007-11-06 08:23:09 PST
Scott, BTW, any image child of the slider should probably be role="presentation". But, I believe there is a funky 0x0 object there which takes focus, which is odd in any case.
Comment 10 User image Ginn Chen 2007-11-07 04:10:26 PST
Sorry, I'm confused.

The child of the slider is not focusable. 

Can we just disable AccessibleText interface and AccessibleTextEditable interface for slider?

Comment 11 User image Aaron Leventhal 2007-11-07 06:13:44 PST
Ginn, that will help with slider, it's a good idea.

It won't help with button though, and other items where MustPrune() is true, because we need to expose AccessibleText interface there. However, they could have an image child.
Comment 12 User image Ginn Chen 2007-11-08 03:36:29 PST
Aaron,

if we don't care nsIAccessible, can we just replace kEmbeddedObjectChar to whitespace in this case?

Sounds like a simple solution?
Comment 13 User image alexander :surkov 2007-11-13 06:48:56 PST
Created attachment 288494 [details] [diff] [review]
quick ginn's version
Comment 14 User image Aaron Leventhal 2007-11-13 11:53:32 PST
Comment on attachment 288494 [details] [diff] [review]
quick ginn's version

TextLength() and other things that increment the offset by 1 for embedded objects would need to be changed. I think that's why Ginn was suggesting a space character as opposed to no character.
Comment 15 User image Aaron Leventhal 2007-11-13 11:56:04 PST
Surkov, another problem with this approach is described in comment 7. When MustPrune() is true we only prune for ATK, AT-SPI and UA. We dan't prune for nsIAccessible.

This is going to take a little more thought.
Comment 16 User image alexander :surkov 2007-11-14 05:51:16 PST
(In reply to comment #15)
> Surkov, another problem with this approach is described in comment 7. When
> MustPrune() is true we only prune for ATK, AT-SPI and UA. We dan't prune for
> nsIAccessible.

We do (http://lxr.mozilla.org/mozilla/source/accessible/src/msaa/nsAccessibleWrap.cpp#242). 
Comment 17 User image alexander :surkov 2007-11-14 06:04:25 PST
Created attachment 288660 [details] [diff] [review]
patch
Comment 18 User image Aaron Leventhal 2007-11-14 06:36:16 PST
Comment on attachment 288660 [details] [diff] [review]
patch

I think space is a good idea, because if there is an embedded object char like an image between two words we do want to separate them somehow.

nit: hans't -> hasn't
Comment 19 User image alexander :surkov 2007-11-16 20:28:59 PST
checked in, unfortunately I forot to fix misspeling :(

Note You need to log in before you can comment on or make changes to this bug.