Opened 14 years ago

Closed 11 years ago

#968 closed enhancement (fixed)

Checkable MenuItem

Reported by: joose Owned by: nonken
Priority: high Milestone: 1.2
Component: themes Version: 0.3
Keywords: MenuItem Cc: Nathan Toone
Blocked By: Blocking:

Description (last modified by bill)

Seems like MenuItem? is missing checkable menuitem, where you can select items on or off.. Like this:

  Use foo
* Use bar
* Use Quux

So that would indicate that bar and quux are turned on. of course corresponding events to match turning on/off perhaps?

Attachments (4)

CheckableMenuItem.patch (1.5 KB) - added by joose 13 years ago.
makes "checking" of menuitem possible
CheckableMenuItem-test.patch (845 bytes) - added by joose 13 years ago.
Patch to test-file
CheckableMenuItem.js (3.2 KB) - added by joose 13 years ago.
Now default values work as supposed. Also setChecked(boolean) is there.
checkableMenu.diff (6.2 KB) - added by nathan 11 years ago.
Here's a patch against current head to implement this - if anyone is interested in resurrecting this issue.

Download all attachments as: .zip

Change History (25)

comment:1 Changed 13 years ago by dylan

Milestone: 0.40.5

comment:2 Changed 13 years ago by joose

Owner: changed from anonymous to bill

I made simple patch to make this possible. What it still requires actually is:

  • Image of "checked" thing.
  • To make default value working (isChecked=true)

How it works, just add checkable="true" and default value is defined by isChecked (boolean)

Changed 13 years ago by joose

Attachment: CheckableMenuItem.patch added

makes "checking" of menuitem possible

Changed 13 years ago by joose

Patch to test-file

Changed 13 years ago by joose

Attachment: CheckableMenuItem.js added

Now default values work as supposed. Also setChecked(boolean) is there.

comment:3 Changed 13 years ago by bill

Component: WidgetsDijit
Milestone: 0.91.0

Hmm, will consider for 1.0.

comment:4 Changed 13 years ago by joose

Cc: joose@… removed
Reporter: changed from joose@… to joose

comment:5 Changed 12 years ago by bill

Milestone: 1.02.0

comment:6 Changed 12 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

Changed 11 years ago by nathan

Attachment: checkableMenu.diff added

Here's a patch against current head to implement this - if anyone is interested in resurrecting this issue.

comment:7 Changed 11 years ago by Nathan Toone

Resolution: fixed
Status: newclosed

(In [14070]) Fixes #968 - adds dijit.CheckedMenuItem? for toggle-based menu items !strict

comment:8 Changed 11 years ago by Nathan Toone

(In [14072]) Refs #968 - fix role for a11y !strict

comment:9 Changed 11 years ago by bill

Component: Dijita11y - review
Description: modified (diff)
Milestone: 1.31.2
Resolution: fixed
Status: closedreopened

Just sending to Becky for testing screen reader.

comment:10 Changed 11 years ago by nathan

Cc: nathan added

comment:11 Changed 11 years ago by bill

Owner: changed from bill to Becky Gibson
Status: reopenednew

comment:12 Changed 11 years ago by Nathan Toone

(In [14086]) Refs #968 - toggling should not happen when item is disabled !strict

comment:13 Changed 11 years ago by Nathan Toone

(In [14106]) Refs #968 - remove width 100%, since it is not needed

comment:14 Changed 11 years ago by Becky Gibson

The aria roles and properties look correct. Unfortunately the screen reader doesn't understand checkable menuitems, yet, so it doesn't say anything different to distinguish the checkable from the regular menu items. However, the correct role is being set so it has been implemented properly.

However, all of the other menu items are counted and an AccessibleDescription? is generated that is "x of 8" where x is the number of the current menu item in the list of 8 items. With the 3 new checkable items added, it should be "x of 11" but the checkable menu items aren't counted and do not get an accessibleDescription. I filed this as a Firefox bug (https://bugzilla.mozilla.org/show_bug.cgi?id=441888) but when I look at the HTML in Firebug, I don't see the checkable items in the table that gets generated for the menu? Can anyone figure out why not? That may be the issue. The HTML in test_menu.html looks correct and the menu divs seem to be nested properly.

comment:15 Changed 11 years ago by Becky Gibson

Component: a11y - reviewDijit

correct aria has been implemented and firefox bug has been fixed so moving this out of a11y-review back to dijit.

comment:16 Changed 11 years ago by Becky Gibson

Owner: changed from Becky Gibson to nathan

comment:17 Changed 11 years ago by nathan

Component: Dijitthemes
Owner: changed from nathan to nonken

I think this is completed - with the exception of (possibly) having different icons than the ones used - Moving to nikolai since he is a bit better-qualified at making that decision.

comment:18 Changed 11 years ago by Nathan Toone

Cc: Nathan Toone added; nathan removed

comment:19 Changed 11 years ago by nonken

(In [14285]) Optimized css, only using gif and fixed potential bug not displaying the checkboxes, refs #968

comment:20 Changed 11 years ago by nonken

I think the way it looks now is good and suggest closing the ticket, I tried with a no border image but using the standard checkbox somehow gives a more unified look, also because the sub menu icons are the same as everywhere as well

comment:21 Changed 11 years ago by Nathan Toone

Resolution: fixed
Status: newclosed

Marking as closed then.

Note: See TracTickets for help on using tickets.