Skip to content

Commit 7b8e687

Browse files
committed
add Example 5 to ex2.html
Adds a forced navigation menu example to demonstrate overriding the default UA stylesheet's `display: none` for <a> tags inside menu elements.
1 parent 7303ec3 commit 7b8e687

1 file changed

Lines changed: 37 additions & 0 deletions

File tree

ex2.html

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,43 @@ <h3 id="complex-broken">Example 4: Broken File menu</h3>
317317
</menubar>
318318

319319
</section>
320+
321+
<section aria-labelledby="forced-nav-heading">
322+
<h3 id="forced-nav-heading">Example 5: Forced Navigation Menu</h3>
323+
<p>
324+
This example demonstrates an author explicitly disregarding the spec and using the menu elements for site navigation. By placing <code>&lt;a&gt;</code> tags inside the menu items and forcing <code>display: initial !important;</code>, they have overridden the UA's default accessibility safeguard (<code>display: none</code>).
325+
</p>
326+
<menubar>
327+
<menuitem><a href="home.html" style="display: initial !important;">Home</a></menuitem>
328+
329+
<submenu>
330+
<menuitem>Services</menuitem>
331+
<menulist>
332+
<menuitem><a href="services/web-dev.html" style="display: initial !important;">Web Development</a></menuitem>
333+
<menuitem><a href="services/seo.html" style="display: initial !important;">SEO</a></menuitem>
334+
335+
<submenu>
336+
<menuitem>Marketing</menuitem>
337+
<menulist>
338+
<menuitem><a href="marketing/social.html" style="display: initial !important;">Social Media</a></menuitem>
339+
<menuitem><a href="marketing/email.html" style="display: initial !important;">Email Campaigns</a></menuitem>
340+
</menulist>
341+
</submenu>
342+
343+
</menulist>
344+
</submenu>
345+
346+
<submenu>
347+
<menuitem>About Us</menuitem>
348+
<menulist>
349+
<menuitem><a href="about/team.html" style="display: initial !important;">Our Team</a></menuitem>
350+
<menuitem><a href="about/careers.html" style="display: initial !important;">Careers</a></menuitem>
351+
</menulist>
352+
</submenu>
353+
354+
<menuitem><a href="contact.html" style="display: initial !important;">Contact Us</a></menuitem>
355+
</menubar>
356+
</section>
320357
</section>
321358

322359
<hr style="margin-bottom: 250px;">

0 commit comments

Comments
 (0)