You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Navigation Menubar Example: Improve high contrast support and refactor javascript (pull #1359)
closes issue #1357 by making the following changes:
* Updated javascript to use a single object.
* Updated CSS and JS to improve high contrast support.
Co-authored-by: Matt King <a11yThinker@gmail.com>
<ahref="../../../#menu">design pattern for menubar</a>
34
+
<ahref="../../#menu">design pattern for menubar</a>
36
35
demonstrates a menubar that provides site navigation menus.
37
36
Each item in the menubar represents a section of a web site for a mythical university and opens a submenu containing menu items that link to pages within that section.
38
37
</p>
39
38
<p>Similar examples include: </p>
40
39
<ul>
41
-
<li><ahref="../menubar-2/menubar-2.html">Editor Menubar Example</a>: Example of a menubar that presents text styling actions similar to an editor application.</li>
42
-
<li><ahref="../../disclosure/disclosure-navigation.html">Example Disclosure for Navigation Menus</a>: Navigation menus implemented as simple drop down lists of links that are shown and hidden using disclosure buttons.</li>
40
+
<li><ahref="menubar-editor.html">Editor Menubar Example</a>: Example of a menubar that presents text styling actions similar to an editor application.</li>
41
+
<li><ahref="../disclosure/disclosure-navigation.html">Example Disclosure for Navigation Menus</a>: Navigation menus implemented as simple drop down lists of links that are shown and hidden using disclosure buttons.</li>
<li>To help communicate that the arrow keys are available for directional navigation within the menubar and its submenus, a border is added to the menubar container when focus is within the menubar.</li>
203
+
<li>To support operating system high contrast settings:
204
+
<ul>
205
+
<li>Focus is highlighted by adding and removing a border around the menu item with focus.</li>
206
+
<li>The arrow icons indicating the current state of expandable menus use in-line SVG images with the CSS <code>currentColor</code> value for the <code>fill</code> and <code>stroke</code> properties of the <code>polygon</code> element.</li>
207
+
</ul>
208
+
</li>
171
209
<li>Since the menubar presents a site navigation system, it is wrapped in a navigation region implemented with a <code>nav</code> element that has an <code>aria-label</code> that matches the label on the menubar.</li>
172
-
<li>The down arrow and right arrow icons are made compatible with high contrast mode and hidden from screen readers by using the CSS <code>content</code> property to render images.</li>
<li><a href="examples/menubar/menubar-1/menubar-1.html">Navigation Menubar Example</a>: Demonstrates a menubar that provides site navigation.</li>
2185
-
<li><a href="examples/menubar/menubar-2/menubar-2.html">Editor Menubar Example</a>: Demonstrates menu radios and menu checkboxes in submenus of a menubar that provides text formatting commands for a text field.</li>
2184
+
<li><a href="examples/menubar/menubar-navigation.html">Navigation Menubar Example</a>: Demonstrates a menubar that provides site navigation.</li>
2185
+
<li><a href="examples/menubar/menubar-editor.html">Editor Menubar Example</a>: Demonstrates menu radios and menu checkboxes in submenus of a menubar that provides text formatting commands for a text field.</li>
0 commit comments