Closed
Bug 368012
Opened 18 years ago
Closed 18 years ago
expose STATE_CHECKABLE for each checkable widget
Categories
(Firefox :: Disability Access, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: nian.liu, Assigned: davidb)
References
(Blocks 1 open bug)
Details
Attachments
(4 files, 1 obsolete file)
4.87 KB,
patch
|
surkov
:
review+
|
Details | Diff | Splinter Review |
7.65 KB,
patch
|
surkov
:
review+
aaronlev
:
review-
|
Details | Diff | Splinter Review |
9.24 KB,
patch
|
aaronlev
:
review+
|
Details | Diff | Splinter Review |
9.39 KB,
patch
|
Details | Diff | Splinter Review |
1.candidate widget are:
checkbox, checkable list item, checkable menu item, checkable tree item
any others?
Assignee | ||
Comment 1•18 years ago
|
||
Note possible related bug 365866 regarding xul cyclers (multistate widgets). The patch on that bug also checks for nsITreeColumn::TYPE_CHECKBOX and reports checkable state. Feel free to steal code if helpful.
Reporter | ||
Comment 2•18 years ago
|
||
(In reply to comment #1)
> Note possible related bug 365866 regarding xul cyclers (multistate widgets).
> The patch on that bug also checks for nsITreeColumn::TYPE_CHECKBOX and reports
> checkable state. Feel free to steal code if helpful.
>
David, 365866 is focused on cycler(in other words, tree cells). this is focused on all checkable widget. if you can fix it in 365866, it will be great
Updated•18 years ago
|
Assignee | ||
Comment 3•18 years ago
|
||
Added 312457 dependency for bookkeeping purposes.
Depends on: 312457
Comment 4•18 years ago
|
||
David, probably you like to do it in one patch (I mean patch of bug 312457)? ;)
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Updated•18 years ago
|
Assignee: nobody → david.bolter
Status: ASSIGNED → NEW
Assignee | ||
Comment 5•18 years ago
|
||
Assignee | ||
Comment 6•18 years ago
|
||
further tweaks to the solution.
Attachment #263409 -
Attachment is obsolete: true
Assignee | ||
Updated•18 years ago
|
Attachment #263413 -
Flags: review?(surkov.alexander)
Assignee | ||
Comment 8•18 years ago
|
||
Surkov, this patch should cover the remaining checkable widgets. Menu and list items have already been fixed (I assume after this bug was reported).
Comment 9•18 years ago
|
||
Comment on attachment 263413 [details] [diff] [review]
proposed patch
r=me
Btw, what's about radio buttons and button[type="checkbox"]?
Attachment #263413 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Comment 10•18 years ago
|
||
Thanks Surkov. I have added radio buttons, as well as XUL buttons of type="checkbox"|"radio".
Attachment #263534 -
Flags: review?(surkov.alexander)
Updated•18 years ago
|
Attachment #263534 -
Flags: review?(surkov.alexander) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #263534 -
Flags: review?(aaronleventhal)
Assignee | ||
Updated•18 years ago
|
Status: NEW → ASSIGNED
OS: Linux → All
Comment 11•18 years ago
|
||
Comment on attachment 263534 [details] [diff] [review]
expanded coverage
For cyclers let's expose an object attribute called "cycles" = "true". Otherwise looks good.
+ else {
+ PRBool isCycler;
+ mColumn->GetCycler(&isCycler);
+ if (isCycler) {
+ *aState |= nsIAccessibleStates::STATE_CHECKABLE;
+ // note cyclers can have many "checked" values (not just true/false)
+ }
+ }
+
Attachment #263534 -
Flags: review?(aaronleventhal) → review-
Assignee | ||
Comment 12•18 years ago
|
||
Surkov, Aaron wanted a cycles attribute. Does this look correct?
Attachment #263683 -
Flags: review?(surkov.alexander)
Comment 13•18 years ago
|
||
Comment on attachment 263683 [details] [diff] [review]
exposes cycles=true object attribute
It's correct, with a few nits:
You can just pass NS_LITERAL_STRING("true") directly as an argument -- no temp variable _true necessary.
Consider whether you need to null check mColumn. I didn't look at the rest of that method to see if it's already been done.
+ PRBool isCycler;
+ mColumn->GetCycler(&isCycler);
+ if (isCycler) {
+ nsAutoString _true;
+ _true.AssignLiteral("true");
+ nsAccessibilityUtils::SetAccAttr(aAttributes,
+ nsAccessibilityAtoms::cycles,
+ _true);
+ }
+
Attachment #263683 -
Flags: review?(surkov.alexander) → review+
Comment 14•18 years ago
|
||
Comment on attachment 263683 [details] [diff] [review]
exposes cycles=true object attribute
nit: please add comment we set here "cycle" attribute and above we set group attributes.
>+ PRBool isCycler;
>+ mColumn->GetCycler(&isCycler);
>+ if (isCycler) {
>+ nsAutoString _true;
>+ _true.AssignLiteral("true");
>+ nsAccessibilityUtils::SetAccAttr(aAttributes,
>+ nsAccessibilityAtoms::cycles,
>+ _true);
I would prefer to use NS_LITERAL_STRING("true") here
Btw, Aaron likes to expose "cycler" attribute instead checkable state or he wants to see them both?
Comment 15•18 years ago
|
||
(In reply to comment #14)
> Btw, Aaron likes to expose "cycler" attribute instead checkable state or he
> wants to see them both?
>
If Aaron gave r+ then it's not a question any more.
Comment 16•18 years ago
|
||
Yes, I like the object attribute _instead of_ CHECKABLE when it's a cycler.
Assignee | ||
Comment 17•18 years ago
|
||
patch to go in.
Thanks for the NS_LITERAL_STRING tip, I was looking for something like that.
Comment 18•18 years ago
|
||
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 19•18 years ago
|
||
I almost forgot to change the docs for AT developers on what object attributes we support:
http://developer.mozilla.org/en/docs/Accessibility/ATSPI_Support#Supported_AT-SPI_Object_Attributes
Also, I'm realizing when the checkable state is exposed, we should exposed an object attribute "checkable" = "true".
We need this because there is no state in ATK. Also, in MSAA we invented a state where there is none, and it would be better to have a more official way in IA2.
You need to log in
before you can comment on or make changes to this bug.
Description
•