The default bug view has changed. See this FAQ.

ARIA menuitem acting as submenu should have PARENT_MENUITEM role

RESOLVED FIXED in mozilla19

Status

()

Core
Disability Access APIs
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: surkov, Assigned: jkitch)

Tracking

(Blocks: 1 bug, {access})

unspecified
mozilla19
access
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

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

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
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)
(Reporter)

Updated

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

Comment 1

5 years ago
Created attachment 677697 [details] [diff] [review]
patch
Assignee: nobody → jkitch.bug
Attachment #677697 - Flags: review?(eitan)
(Reporter)

Comment 2

5 years ago
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+
(Assignee)

Comment 4

4 years ago
Created attachment 678257 [details] [diff] [review]
patch v2

Suggested changes have been made.
Attachment #677697 - Attachment is obsolete: true
(Reporter)

Comment 5

4 years ago
landed https://hg.mozilla.org/integration/mozilla-inbound/rev/b029a90619f5

thanks, James!
Flags: in-testsuite+
(Reporter)

Updated

4 years ago
OS: Mac OS X → All
Hardware: x86 → All
https://hg.mozilla.org/mozilla-central/rev/b029a90619f5
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
You need to log in before you can comment on or make changes to this bug.