Closed Bug 368012 Opened 18 years ago Closed 18 years ago

expose STATE_CHECKABLE for each checkable widget

Categories

(Firefox :: Disability Access, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: nian.liu, Assigned: davidb)

References

(Blocks 1 open bug)

Details

Attachments

(4 files, 1 obsolete file)

1.candidate widget are: checkbox, checkable list item, checkable menu item, checkable tree item any others?
Blocks: keya11y
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.
(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
Blocks: xula11y
No longer blocks: keya11y
Added 312457 dependency for bookkeeping purposes.
Depends on: 312457
David, probably you like to do it in one patch (I mean patch of bug 312457)? ;)
Status: NEW → ASSIGNED
Assignee: nobody → david.bolter
Status: ASSIGNED → NEW
Attached patch proposed patchSplinter Review
further tweaks to the solution.
Attachment #263409 - Attachment is obsolete: true
Attachment #263413 - Flags: review?(surkov.alexander)
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 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+
Thanks Surkov. I have added radio buttons, as well as XUL buttons of type="checkbox"|"radio".
Attachment #263534 - Flags: review?(surkov.alexander)
Attachment #263534 - Flags: review?(surkov.alexander) → review+
Attachment #263534 - Flags: review?(aaronleventhal)
Status: NEW → ASSIGNED
OS: Linux → All
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-
Surkov, Aaron wanted a cycles attribute. Does this look correct?
Attachment #263683 - Flags: review?(surkov.alexander)
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 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?
(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.
Yes, I like the object attribute _instead of_ CHECKABLE when it's a cycler.
patch to go in. Thanks for the NS_LITERAL_STRING tip, I was looking for something like that.
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
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.

Attachment

General

Created:
Updated:
Size: