joomla / accessibility

Collaboration to implement accessbility into Joomla
8 stars 12 forks source link

Joomla 4 Admin menu #35

Open zwiastunsw opened 6 years ago

zwiastunsw commented 6 years ago

Ciaran Walsh asks for tests and comments on the pen for new sidebar. You can submit your comments immediately to https://github.com/joomla/40-backend-template/issues/365 or If you want to discuss them first in the Joomla Accessibility Team, report them to this topic.

zwiastunsw commented 6 years ago

This is the first part of my comments.

1. Use the nav tag for the menu container This is the navigation menu. Use the nav tag as a container and not as a div element with a "navigation" role. The nav element has a core navigation role. suggestion: Update this line for:
<nav class="mainnav-container" aria-label="Admin menu">

2. Don't use ARIA menu semantics in navigation menus ARIA menus are not designated for navigation but for application behavior.

3. Use semantics tag

4. ARIA markup In the horizontal mega menu, the new website of the Accessiblility Initiative uses only the following ARIA markup:

My proposal: Use this simple marking and then, if necessary, progressively improve it.

brianteeman commented 6 years ago

I agree with all of this - just one part I don't understand

Since the li element does not play its core role here, it can be assigned a role="presentation".

Do you mean all li elements or just the top level li elements eg Users, Menus, Content etc

zwiastunsw commented 6 years ago

I am thinking of all the elements of li that contain the element a

brianteeman commented 6 years ago

reading this http://csskarma.com/blog/difference-rolepresentation-aria-hiddentrue/


<ul role="presentation">
  <li>This is an item</li>
  <li>I like a good<a href="#!"sandwich</a></li>
  <li>Hello last item</li>
</ul>

will be seen in the DOM as

<span role="presentation">
  <span>This is an item</span>
  <span>I like a good <a href="#!"sandwich</a></span>
  <span>Hello last item</span>
</span>

So I n ow understand why you chose role=presentation but shouldnt it be on the UL and not on every LI

zwiastunsw commented 6 years ago

The 'ul' element says we have a list of elements. But the elements in this list are not 'li' but 'a'. Therefore, we remove the core role from the 'li' element, and not from the 'ul'. See source code in menu in the horizontal mega menu, the new website of the Accessiblility Initiative

Thank you for the link ! :).

chmst commented 6 years ago

I think it is not necessary to see the 'ul', Whether it is a list or not is not important or is it? But it should not make a difference for a11y.

brianteeman commented 6 years ago

The benefit of the role being on the ul is that it will simplify and reduce the markup.

zwiastunsw commented 6 years ago

@chmst You are right. This is not very important. But he is. The screen reader will announce for ex. Naivgation landmark list 6 items. But I'm still going to test it with a screen reader.

zwiastunsw commented 6 years ago

This is the two part of my comments. Keyboard interaction

Since the navigation menu is a set of links, the user can navigate through the menu items using the tab key. This is not a good solution, however, because users have to use the tab to access all menu items in order to get to the next active item on the page.

In DHTML Style Guide Working Group was proposed the keyboard model, which was adapted in the WAI-ARIA Authoring Practices. Specifically, this guidance limits the role of the tab key to entering and existing the menu. In this model, once the menu has focus, the arrow keys, not tab, are used to navigate between top-level menu items.

About managing focus within components using a roving tabindex see WAI-ARIA practices.

Note I corrected this description after @dgt41 remark (below).

brianteeman commented 6 years ago

agreed

dgrammatiko commented 6 years ago

Part two I guess is for me...

dgrammatiko commented 6 years ago

Down Arrow performs as Right Arrow is described above, and vice versa. Up Arrow performs as Left Arrow is described above, and vice versa.

Ok just out of curiosity why this is changing depending on the layout? I mean for visual impaired people the actual view of the page is less important than the arrow keys. Unless I'm missing something...

zwiastunsw commented 6 years ago

I mean for visual impaired people the actual view of the page is less important than the arrow keys. Unless I'm missing something...

It is not only people with visual impairments who use the keyboard. Also people who cannot use a mouse.

ciar4n commented 6 years ago

Thank you @zwiastunsw

I have updated the pen as per your suggestions (https://github.com/joomla/accessibility/issues/35#issuecomment-373691332)

https://codepen.io/littlesnippets/pen/4d7312648363235a6b1c9ed9a8df64cf

zwiastunsw commented 6 years ago

@dgt41 : I corrected description keyboard behavior after your comment.

zwiastunsw commented 6 years ago

This is the third part of my comments. Screen readers interaction: The screen reader should announce:

Use Javascript to dynamically change information about the expanded state submenu.

Use aria-hidden carefully. For example, do not hide the submenu nested list, because the screen reader will not know that there is a submenu.

brianteeman commented 6 years ago

the first three all seem to be done

zwiastunsw commented 6 years ago

@brianteeman : Yes! I added this comment so that everything would be in one place.

dgrammatiko commented 6 years ago

So we have a new codepen https://codepen.io/dgt41/pen/jzLGaG with the (early) functionality in place. At the moment we're stuck because the html markup needs to change again. The problems are:

Then we still have to patch correctly the close function and any other bugs that are still there. But this menu now is based on the code from W3C (we are allowed to use it, I checked with @brianteeman) so in theory we should be in the right track.