Closed Bug 786566 Opened 10 years ago Closed 9 years ago

ARIA menuitem acting as submenu should have PARENT_MENUITEM role

Categories

(Core :: Disability Access APIs, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla19

People

(Reporter: surkov, Assigned: jkitch)

References

(Blocks 1 open bug, )

Details

(Keywords: access, Whiteboard: [good first bug][mentor=eitan@monotonous.org][lang=c++])

Attachments

(1 file, 1 obsolete file)

It makes sense on ATK where this role has special mapping. On the another hand it allows to workaround MustPrune issue which cuts the submenu if we keep menuitem role.

steps to fix:
1) add else if clause in Accessible::ARIATransformRole for menuitem role. If it has aria-haspopup attribute then return PARENT_MENUITEM role (refer to spec "If the menu item has its aria-haspopup attribute set to true, it indicates that the menu item may be used to launch a sub-level menu").
2) add test_aria_menu.html mochistest under tree folder (use test_aria_presentation.html) (don't forget to fix Makefile.in)
Keywords: access
Whiteboard: [good first bug][mentor=eitan@monotonous.org][lang=c++]
Attached patch patch (obsolete) — Splinter Review
Assignee: nobody → jkitch.bug
Attachment #677697 - Flags: review?(eitan)
Comment on attachment 677697 [details] [diff] [review]
patch

Trev, have a time for review over weekends?
Attachment #677697 - Flags: review?(trev.saunders)
Comment on attachment 677697 [details] [diff] [review]
patch

>+      if (mContent->AttrValueIs(kNameSpaceID_None,
>+                                nsGkAtoms::aria_haspopup,
>+                                nsGkAtoms::_true,
>+                                eCaseMatters)) {

nit, please try to reduce lines while staying within 80 char limit.

>+  <div id="menu_popup">
>+    <ul role="menu">
>+        <li role="menuitem" aria-haspopup="true">Menu with popup</li>
>+    </ul>
>+  </div>
>+
>+  <div id="menu_nopopup">
>+    <ul role="menu">
>+      <li role="menuitem" aria-haspopup="false">Menu with explicit no popup</li>
>+    </ul>
>+  </div>

nit, it would be nice if you keep these in the same order as the tests
Attachment #677697 - Flags: review?(trev.saunders)
Attachment #677697 - Flags: review?(eitan)
Attachment #677697 - Flags: review+
Attached patch patch v2Splinter Review
Suggested changes have been made.
Attachment #677697 - Attachment is obsolete: true
OS: Mac OS X → All
Hardware: x86 → All
https://hg.mozilla.org/mozilla-central/rev/b029a90619f5
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.