Closed
Bug 241064
Opened 21 years ago
Closed 21 years ago
mozilla need support ATK_STATE_SENSITIVE, STATE_SHOWING, ROLE_HTML_CONTAINER, STATE_SINGLE_LINE, ROLE_SCROLL_PANE
Categories
(Core :: Disability Access APIs, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: Louie.Zhao, Assigned: Louie.Zhao)
References
Details
Attachments
(2 files, 1 obsolete file)
9.04 KB,
patch
|
pkwarren
:
review+
Henry.Jia
:
superreview+
|
Details | Diff | Splinter Review |
1.05 KB,
patch
|
Louie.Zhao
:
review+
Henry.Jia
:
superreview+
|
Details | Diff | Splinter Review |
This bug is to refine some minor atk state & atk role exported by mozilla to
at-poke, which includes:
1. support ATK_STATE_SENSITIVE: mozilla doesn't export ATK_STATE_SENSITIVE for
any element, which is needed by at applications. Currently, we add this state
for all objects which is not "UNAVAILABLE". That is to say, any element which
has ATK_STATE_ENABLED will have ATK_STATE_SENSITIVE. This is just a simple fix
after examine the atk information exported by gail. ATK_STATE_SENSITIVE always
goes with ATK_STATE_ENABLED.
2.STATE_SHOWING is an important state. Many at tools judge whether each element
has this state before any other querying. Unfortuately, mozilla doesn't support
this now.
3.Input box in HTML should have STATE_SINGLE_LINE state.
4.Not exporting any ATK_STATE is quite dangerous. Some state, such as
ATK_STATE_SHOWING is basic need for element.
4.ROLE_HTML_CONTAINER and ROLE_SCROLL_PANE should be supported instead of
exporting ROLE_PANE only.
Assignee | ||
Comment 1•21 years ago
|
||
This patch need bug241054 support since it needs ROLE_SCROLL_PANE and
ROLE_HTML_CONTAINER.
Assignee | ||
Updated•21 years ago
|
Attachment #146571 -
Flags: review?(pkw)
Comment 2•21 years ago
|
||
Back on the STATE_UNAVAILABLE discussion.
This is the part that confuses me. Similar code in blockaccessible and xultab
accessible make it appear that the state is always unavailable for those items.
NS_IMETHODIMP nsOuterDocAccessible::GetState(PRUint32 *aState)
{
- return nsAccessible::GetState(aState);
+ nsAccessible::GetState(aState);
+ *aState &= ~STATE_FOCUSABLE;
+ *aState |= STATE_UNAVAILABLE;
+ return NS_OK;
}
Assignee | ||
Comment 3•21 years ago
|
||
Through examing ATK state exported by "yelp", nsOuterDocAccessible,
nsXULTabBoxAccessible, nsHTMLBlockAccessible shouldn't have "STATE_ENABLE" and
"STATE_SENSITIVE". "STATE_SHOWING" and "STATE_VISIBLE" are neccessary for these
objects.
Currently, we have no idea "WHAT" atk info should be exported by each kind of
atk object in mozilla because this depends on the implmentation of AT Tools,
which is still under development. For example, ATK_STATE_SHOWING wasn't be used
before by AT Tools, but now it's an important STATE for AT Tools to examine.
Since there is no formal docuemnt to tell, comparing with GNOME application
(e.g. Gail) would be a feasible way for us to refine ATK info exported by mozilla.
Aaron, do you have any suggestion?
Comment 4•21 years ago
|
||
Comment on attachment 146571 [details] [diff] [review]
patch v1
>Index: accessible/src/base/nsAccessible.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/base/nsAccessible.cpp,v
>retrieving revision 1.91
>diff -u -r1.91 nsAccessible.cpp
>--- accessible/src/base/nsAccessible.cpp 11 Feb 2004 04:56:56 -0000 1.91
>+++ accessible/src/base/nsAccessible.cpp 20 Apr 2004 03:52:41 -0000
>@@ -568,7 +568,8 @@
> *aState |= STATE_INVISIBLE;
> if (isOffscreen)
> *aState |= STATE_OFFSCREEN;
>- }
>+ } else
>+ *aState |= STATE_SHOWING;
This patch looks like it may run into the same problems as the one in Bug
241055, as it is setting the state flags with extended state masks.
>Index: accessible/src/base/nsFormControlAccessible.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/base/nsFormControlAccessible.cpp,v
>retrieving revision 1.7
>diff -u -r1.7 nsFormControlAccessible.cpp
>--- accessible/src/base/nsFormControlAccessible.cpp 31 Jul 2003 08:09:19 -0000 1.7
>+++ accessible/src/base/nsFormControlAccessible.cpp 20 Apr 2004 03:52:42 -0000
>@@ -71,6 +71,8 @@
> htmlFormElement->GetDisabled(&disabled);
> nsAutoString typeString;
> htmlFormElement->GetType(typeString);
>+ if (typeString.EqualsIgnoreCase("text"))
>+ *_retval |= STATE_SINGLE_LINE;
Same issue here with STATE_SINGLE_LINE (an extended state).
Assignee | ||
Comment 5•21 years ago
|
||
This patch makes use of GetExtState to isolate "extended state" from "state" to
prevent from interfereing with MSAA. All "extended state" is set in
GetExtState. When atk state is wanted, mozilla first examines "GetState", then
ADD additional "extended state" from examing "GetExtState".
Attachment #146571 -
Attachment is obsolete: true
Assignee | ||
Updated•21 years ago
|
Attachment #146748 -
Flags: review?(pkw)
Assignee | ||
Updated•21 years ago
|
Attachment #146571 -
Flags: review?(pkw)
Comment 6•21 years ago
|
||
My suggestion is that we get some documentation with an exact description of
each state, when and wher it should be used and follow that spec.
Philip and I could not find such a spec online using Google. We're having to
guess, and each of us thinks the ATK states mean something different.
In my mind, STATE_UNAVAILABLE is *not* the exact opposite of STATE_SENSITIVE,
but may be the opposite of STATE_ENABLED.
I don't see how an HTML block can be "unavailable".
Comment 7•21 years ago
|
||
The online API documentation for ATK _does_ include a description of each
ATK_STATE. This is the same as the HTML documentation built when rebuilding ATK
from cvs. I will accept that it is not verbose, but it _is_ authoritative. If
you have specific questions about a specific state, ask them on
gnome-accessibility-devel@gnome.org and we'll be glad to reply, and fold
suggested revisions into the ATK docs.
thanks
Comment 8•21 years ago
|
||
Comment on attachment 146748 [details] [diff] [review]
patch v2
>Index: accessible/src/atk/nsAccessibleWrap.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/accessible/src/atk/nsAccessibleWrap.cpp,v
>retrieving revision 1.11
>diff -u -r1.11 nsAccessibleWrap.cpp
>--- accessible/src/atk/nsAccessibleWrap.cpp 20 Apr 2004 17:15:53 -0000 1.11
>+++ accessible/src/atk/nsAccessibleWrap.cpp 22 Apr 2004 07:32:20 -0000
>@@ -890,12 +901,12 @@
> nsresult rv = accWrap->GetState(&accState);
> NS_ENSURE_SUCCESS(rv, state_set);
>
>- if (accState == 0) {
>- nsresult rv = accWrap->GetExtState(&accState);
>- //NS_ENSURE_SUCCESS(rv, state_set);
>- if (accState == 0)
>- return state_set;
>- }
>+ rv = accWrap->GetExtState(&accState);
>+ NS_ENSURE_SUCCESS(rv, state_set);
>+
>+ if (accState == 0)
>+ return state_set;
>+
> nsAccessibleWrap::TranslateStates(accState, state_set);
> return state_set;
> }
I would prefer if we change the TranslateStates function to accept two state
parameters - one for the regular state and one for the extended state. This
doesn't have to happen with this bug though. It would make things simpler in
the future because we would not have to worry about choosing extended states
which do not conflict with commonly used MSAA states.
Updated•21 years ago
|
Attachment #146748 -
Flags: review?(pkw) → review+
Assignee | ||
Updated•21 years ago
|
Attachment #146748 -
Flags: superreview?(Henry.Jia)
Assignee | ||
Updated•21 years ago
|
Attachment #146748 -
Flags: superreview?(Henry.Jia) → superreview?(jst)
Comment on attachment 146748 [details] [diff] [review]
patch v2
sr=henry
Attachment #146748 -
Flags: superreview?(jst) → superreview+
Assignee | ||
Comment 10•21 years ago
|
||
Thanks for r and sr. Patch checked in trunk.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Comment 11•21 years ago
|
||
STATE_UNAVAILABLE shouldn't be applied to elements that aren't disabled (grayed
out).
Comment 12•21 years ago
|
||
An explaination of STATE_UNAVAILABLE is here:
http://blogs.msdn.com/saraford/archive/2004/01/06/48091.aspx
Updated•21 years ago
|
Attachment #150222 -
Flags: superreview?(Henry.Jia)
Attachment #150222 -
Flags: review?(Louie.Zhao)
Assignee | ||
Updated•21 years ago
|
Attachment #150222 -
Flags: review?(Louie.Zhao) → review+
Attachment #150222 -
Flags: superreview?(Henry.Jia) → superreview+
Comment 13•21 years ago
|
||
Checking in src/base/nsOuterDocAccessible.cpp;
/cvsroot/mozilla/accessible/src/base/nsOuterDocAccessible.cpp,v <--
nsOuterDocAccessible.cpp
new revision: 1.20; previous revision: 1.19
done
Checking in src/xul/nsXULTabAccessible.cpp;
/cvsroot/mozilla/accessible/src/xul/nsXULTabAccessible.cpp,v <--
nsXULTabAccessible.cpp
new revision: 1.22; previous revision: 1.21
done
You need to log in
before you can comment on or make changes to this bug.
Description
•