Closed Bug 370163 Opened 17 years ago Closed 17 years ago

<select> with optgroup has dead accessibles

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: parente, Assigned: aaronlev)

References

(Blocks 1 open bug)

Details

(Keywords: access)

Attachments

(2 files, 2 obsolete files)

Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a3pre) Gecko/20070212 Minefield/3.0a3pre

1. Open the attached test page
2. Poke at the last selection box
3. Notice the structure of the children under this accessible is the following:

Numbers (accessible text: 8 embed characters)
  child 0 (dead accessible)
  child 1 (dead accessible)
  child 2 (dead accessible)
  child 3 (dead accessible)
  child 4 (dead accessible)
  child 5 (dead accessible)
  child 6 (dead accessible)
  child 7 (dead accessible)
One
Two
Three
Four
Letters (accessible text: 3 embed characters)
  child 0 (dead accessible)
  child 1 (dead accessible)
  child 2 (dead accessible)
A
B
C

It looks like the code handling group boxes was never updated for new-atk, or is some mixmatch of tree code and new-atk.
Summary: Group selection boxes have dead accessibles → <select> with optgroup has dead accessibles
Blocks: htmla11y
Blocks: lsr
Are you sure this bug requires optgroup usage?

We're currently invalidating all the children every time the user changes an option in the combo box?
I haven't seen this bug on a standard list box. Only on optgroup's where the contents are more tree-like than list like.

Is the second question directed at me? I'm not sure what you're asking or how I can tell.
The 2nd part was a statement. The ? was a typo.
Keywords: access
It's not worth all the extra code to try to flatten the list. In fact, those <optgroup>'s are more like headings than they are options. They're neither focusable nor selectable.
Attachment #262555 - Flags: review?(Evan.Yan)
In at-poke, it shows <optgroup> have "selectable" states and the first one also has "selected" state.

Would you like to fix it as well?
Yes, that's easy. Do you need a new patch?
Actually, that should already be fixed:

NS_IMETHODIMP
nsHTMLSelectOptGroupAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
{
  nsresult rv = nsHTMLSelectOptionAccessible::GetState(aState, aExtraState);
  NS_ENSURE_SUCCESS(rv, rv);

  *aState &= ~(nsIAccessibleStates::STATE_FOCUSABLE |
               nsIAccessibleStates::STATE_SELECTABLE);

  return NS_OK;
}
Evan, that code should clear the states. When I look at it in MSAA Inspect the states are not there.

I think the ATK bridge is adding focusable and selectable for those objects. Or, where are those states getting added?
Comment on attachment 262555 [details] [diff] [review]
Remove code that tries to flatten list, fix level/setsize/posinset calculation for GetAttributesInternal()

Oh shoot, that's why we have to keep the list flat -- the selection interface requires child offsets.

Good catch Evan.
Attachment #262555 - Flags: review?(Evan.Yan)
Attached patch Keep list flat - WIP (obsolete) — Splinter Review
Attachment #262555 - Attachment is obsolete: true
Attached patch Keep list flatSplinter Review
I can't help if libatk says an <optgroup> is selectable when it isn't, unless we implement AtkSelection on the optgroup instead of the listbox itself, which be a bit unexpected.
Attachment #262649 - Flags: review?(Evan.Yan)
Attachment #262639 - Attachment is obsolete: true
Comment on attachment 262649 [details] [diff] [review]
Keep list flat

r=me
Attachment #262649 - Flags: review?(Evan.Yan) → review+
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: