Skip to content

Commit 3902461

Browse files
committed
Menu: Document that menus and role shouldn't be changed after init. Fixes jquery#84.
1 parent b4dd72d commit 3902461

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

entries/menu.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,19 @@
7373
</desc>
7474
</option>
7575
<option name="menus" type="String" default='"ul"' example-value='"div"'>
76-
<desc>Selector for the elements that serve as the menu container, including sub-menus.</desc>
76+
<desc>
77+
<p>Selector for the elements that serve as the menu container, including sub-menus.</p>
78+
<p><em>Note: The <code>menus</code> option should not be changed after initialization. Existing submenus will not be updated.</em></p>
79+
</desc>
7780
</option>
7881
<option name="position" type="Object" default='{ my: "left top", at: "right top" }' example-value='{ my: "left top", at: "right-5 top+5" }'>
7982
<desc>Identifies the position of submenus in relation to the associated parent menu item. The <code>of</code> option defaults to the parent menu item, but you can specify another element to position against. You can refer to the <a href="/position/">jQuery UI Position</a> utility for more details about the various options.</desc>
8083
</option>
8184
<option name="role" type="String" default='"menu"' example-value="null">
82-
<desc>Customize the ARIA roles used for the menu and menu items. The default uses <code>"menuitem"</code> for items. Setting the <code>role</code> option to <code>"listbox"</code> will use <code>"option"</code> for items. If set to <code>null</code>, no roles will be set, which is useful if the menu is being controlled by another element that is maintaining focus.</desc>
85+
<desc>
86+
<p>Customize the ARIA roles used for the menu and menu items. The default uses <code>"menuitem"</code> for items. Setting the <code>role</code> option to <code>"listbox"</code> will use <code>"option"</code> for items. If set to <code>null</code>, no roles will be set, which is useful if the menu is being controlled by another element that is maintaining focus.</p>
87+
<p><em>Note: The <code>role</code> option should not be changed after initialization. Existing (sub)menus and menu items will not be updated.</em></p>
88+
</desc>
8389
</option>
8490
</options>
8591
<methods>

0 commit comments

Comments
 (0)