Closed Bug 441991 Opened 16 years ago Closed 15 years ago

Test for nsXULListitemAccessible::GetName uses self referential aria-labelledby correctly.

Categories

(Core :: Disability Access APIs, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Fallen, Assigned: davidb)

References

(Blocks 1 open bug)

Details

(Keywords: calendar-integration)

Attachments

(1 file, 1 obsolete file)

Using a listitem its not possible to assign the accessible name using a different node, and the label attribute of the listitem itself. Example snippet:

  <listbox id="reminder-listbox">
    <listitem id="115e5dda"
              label="The moment the event starts"
              aria-labelledby="reminder-action-DISPLAY 115e5dda"/>
  </listbox>
  <menulist id="reminder-actions-menulist">
    <menupopup>
      <menuitem id="reminder-action-DISPLAY"
                value="DISPLAY"
                label="Show an Alert"/>
      <menuitem id="reminder-action-EMAIL"
                value="EMAIL"
                label="Send an E-mail"/>
    </menupopup>
  </menulist>

The listitem should read: "Show an Alert The moment the event starts".

I was told one of the Problems is that nsXULListitemAccessible::GetName prefers the label attribute over aria-labelledby. Another problem is probably the use of recursion.

I would expect that if aria-labelledby refers to the node it is set on, that the label attribute is used instead of aria-labelledby again.
Blocks: aria, 191a11y
Attached patch Patch (obsolete) — Splinter Review
Philipp, can you run with this patch and see if it gives you the right result?
Assignee: nobody → marco.zehe
Status: NEW → ASSIGNED
Last I remember, this didn't change anything. I think we talked about this briefly last year, but I don't remember what we came out with.
Somebody should check this again since we changed and cleaned up name calculation algorithm.
Assignee: marco.zehe → bolterbugz
Attached patch test passesSplinter Review
Confirmed via automated test that this is fixed; almost certainly by Alexander's name calc refactor. Not this patch adds a test to confirm the problem case; but there is somewhat similar existing test already. It is probably good to add this one?
Attachment #327613 - Attachment is obsolete: true
Attachment #384235 - Flags: review?(surkov.alexander)
Summary: nsXULListitemAccessible::GetName prefers label attribute over aria-labelledby and doesn't allow recursion → Test for nsXULListitemAccessible::GetName uses self referential aria-labelledby correctly.
Attachment #384235 - Attachment is patch: true
Attachment #384235 - Flags: review?(surkov.alexander) → review+
Comment on attachment 384235 [details] [diff] [review]
test passes

good, thanks, r=me
Comment on attachment 384235 [details] [diff] [review]
test passes

Requesting additional review from Marco to confirm.
Attachment #384235 - Flags: review?(marco.zehe)
Attachment #384235 - Flags: review?(marco.zehe) → review+
Comment on attachment 384235 [details] [diff] [review]
test passes

>+  <!-- bug 41991; create name from other menuitem label listitem's own label -->

One 4 missing at the beginning of the number.

r=me, thanks!
Thanks fixed bug numbering.

Pushed as changeset: http://hg.mozilla.org/mozilla-central/rev/962a732f1d8a
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: