? NPM Resource Changed ? Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
19 Feb 2019

This fixes the browse view aspect of what's discussed in #23932 (please do not close that issue as the list view is still to be worked on)

Fixes various a11y issue keyboard navigation issues in the media manager browse view

avatar wilsonge wilsonge - open - 19 Feb 2019
avatar wilsonge wilsonge - change - 19 Feb 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 19 Feb 2019
Category JavaScript Administration com_media NPM Change Language & Strings
avatar wilsonge wilsonge - change - 19 Feb 2019
Title
WIP at making media manager work with keyboard navigation
WIP at making media manager browse view work with keyboard navigation
avatar wilsonge wilsonge - edited - 19 Feb 2019
avatar wilsonge wilsonge - change - 19 Feb 2019
The description was changed
avatar wilsonge wilsonge - edited - 19 Feb 2019
avatar wilsonge wilsonge - change - 19 Feb 2019
Title
WIP at making media manager browse view work with keyboard navigation
[4.0] [a11y] Make media manager browse view work with keyboard navigation
avatar wilsonge wilsonge - edited - 19 Feb 2019
avatar zwiastunsw
zwiastunsw - comment - 20 Feb 2019

Link "Toggle select all" should be a checkbox. Anachor is an incorrect tag at this point. It is not possible to communicate the status of the switch to the users of the screen reader.
mm_toolbar_toggle png_

    <div class="media-view-icons">
      <a href="#" aria-label="Toggle select all" class="media-toolbar-icon media-toolbar-select-all">
        <span aria-hidden="true" class="fa fa-square-o"></span>
      </a>
    </div> 
avatar zwiastunsw
zwiastunsw - comment - 20 Feb 2019

The part of the toolbar is the breadcrumbs. It should be included in the nav tag with aria-label="You are here" (e.g)
mm_breadcrumbs

    <ol class="media-breadcrumb">
      <li class="media-breadcrumb-item">
        <a href="#">images</a>
      </li>
      <li class="media-breadcrumb-item">
        <a href="#">banners</a>
      </li>
    </ol> 
avatar zwiastunsw
zwiastunsw - comment - 20 Feb 2019

The toolbar should have the attribute role="toolbar" and the attribute aria-label="Media manager" (e.g).

mm_toolbar

  <div class="media-toolbar" role="toolbar" aria-label="COM_MEDIA_TOOLBAR">
    <!----> 
  </div>
avatar zwiastunsw
zwiastunsw - comment - 20 Feb 2019

In the toolbar we have a set of buttons. All of them are incorrectly tagged as links.
They should indicate to the user the status - a tag a cannot be used to indicate a state.

In addition: Grid switches (increase, decrease) should be hidden from screen readers.

mm_toolbar_buttons

avatar wilsonge
wilsonge - comment - 20 Feb 2019

Ok the toolbar role/label change is easy to do. What’s the recommended markup for the breadcrumbs? Should be easy enough

I’m leaving the checkboxes for another PR. Implementing a form element is going to be complicated and is not something I want to try doing as part of this PR

avatar brianteeman
brianteeman - comment - 20 Feb 2019

Look at the breadcrumbs module o think that's correct

avatar zwiastunsw
zwiastunsw - comment - 20 Feb 2019
<nav role="navigation" aria-label="COM_MEDIA_BREADCRUMBS">
       <ol class="media-breadcrumb">
         <li class="media-breadcrumb-item">
           <a href="#">images</a>
         </li>
       </ol>
   </nav>
avatar wilsonge wilsonge - change - 21 Feb 2019
Labels Added: ? NPM Resource Changed ?
avatar wilsonge
wilsonge - comment - 21 Feb 2019

OK Fixes to toolbar - it now has a role=toolbar, aria-label, and all the buttons are now <button> elements instead of <a> tags. Breadcrumbs fixes also pushed up. I deliberately didn't add the role=nav in the example @zwiastunsw gave because https://www.w3.org/TR/wai-aria-practices/examples/breadcrumb/index.html was missing it and added in the aria-current mentioned there. But happy to flip back if needed.

avatar wilsonge
wilsonge - comment - 21 Feb 2019

I think that's everything covered aside from the checkboxes you guys have asked for

avatar wilsonge
wilsonge - comment - 21 Feb 2019

@brianteeman Would you be ok to the changes of an action list to type button - it is just as simple as changing the markup where you commented - but the styling is more complicated and I don't really have a huge amount of time to invest into trying to make it all work nicely

avatar brianteeman
brianteeman - comment - 21 Feb 2019

I will bow to @zwiastunsw expertise

avatar zwiastunsw
zwiastunsw - comment - 21 Feb 2019
  1. In my opinion role="navigation" is redundant, but we have agreed with Brian that it must be because Joomla supports IE11 (IE11 does not support HTML5 tags). So I suggest you add it.
  2. The search field has no associated label. Add it.
  3. Add role="search" to <div class="media-view-search-input">
  4. Do not change the native role of the a tag. If you need to use a button, use the button. These are action buttons, not links. See in the illustration what happens when you use a tag instead of a button.
    buttons

Code in file directory.vue is not correct. Change <a href="#"...> to <button ...

        <a href="#" class="media-browser-select"
          @click.stop="toggleSelect()"
          :aria-label="translate('COM_MEDIA_TOGGLE_SELECT_ITEM')"
          @focus="focused(true)" @blur="focused(false)">
        </a>
        <div class="media-browser-actions" :class="{'active': showActions}">
            <a href="#" class="action-toggle" role="button"
              :aria-label="translate('COM_MEDIA_OPEN_ITEM_ACTIONS')" @keyup.enter="openActions()"
               @focus="focused(true)" @blur="focused(false)" @keyup.space="openActions()">
                <span class="image-browser-action fa fa-ellipsis-h" aria-hidden="true"
                      @click.stop="openActions()"></span>
            </a>
            <div v-if="showActions" class="media-browser-actions-list">
                <a href="#" class="action-rename" ref="actionRename" @keyup.enter="openRenameModal()"
                  :aria-label="translate('COM_MEDIA_ACTION_RENAME')"
                  @focus="focused(true)" @blur="focused(false)" @keyup.esc="showActions = false">
                    <span class="image-browser-action fa fa-text-width" aria-hidden="true"
                          @click.stop="openRenameModal()"></span>
                </a>
                <a href="#" class="action-delete" @keyup.enter="openConfirmDeleteModal()"
                  :aria-label="translate('COM_MEDIA_ACTION_DELETE')"
                   @focus="focused(true)" @blur="focused(false)" @keyup.esc="showActions = false">
                    <span class="image-browser-action fa fa-trash" aria-hidden="true" @click.stop="openConfirmDeleteModal()"></span>
                </a>
            </div>
        </div>
avatar wilsonge
wilsonge - comment - 21 Feb 2019

Done 1, 2 and 3. 4 is what I was discussing with Brian. The CSS is slightly beyond my ability to fix - so I'll leave that for someone else to take a stab at in a different PR

avatar wilsonge
wilsonge - comment - 21 Feb 2019

Just figured it out. Links made into buttons

avatar wilsonge
wilsonge - comment - 21 Feb 2019

The button change makes the system tests fail - I think joomla/test-system#52 should fix that. Once you guys are happy with this PR i'll merge that up front

Back to the stage of I think it's only the checkboxes left

avatar brianteeman
brianteeman - comment - 21 Feb 2019

For the checkboxes see #23970

avatar zwiastunsw
zwiastunsw - comment - 21 Feb 2019
avatar wilsonge
wilsonge - comment - 21 Feb 2019

So can we run a last test on this and ensure that only the checkbox issue is left to solve in a separate place?

avatar zwiastunsw
zwiastunsw - comment - 22 Feb 2019

@wilsonge : Which files have you changed?

avatar brianteeman
brianteeman - comment - 22 Feb 2019

I will try to find some time tomorrow to take a look. because of the npm it takes a long time to build on windows (as you saw)

avatar zwiastunsw
zwiastunsw - comment - 22 Feb 2019
  1. When the screen reader is on, the Enter and Space keys do not activate the action buttons (Download, Rename item...)
  2. "Open item actions" button should be a menu button
  3. The action buttons should be grouped by using a list elements (ul, li).
  4. Use the arrow keys to move the focus between action items.
avatar wilsonge
wilsonge - comment - 23 Feb 2019

Done 1 and 3. I've done 2 and 4 on the image thing only. Unfortunately I need to head out but will try and find some time to do them on directory, file and video areas later today

avatar wilsonge
wilsonge - comment - 23 Feb 2019

Pushed - @zwiastunsw this should cover all the things you mentioned

avatar wilsonge
wilsonge - comment - 25 Feb 2019

@zwiastunsw @brianteeman Can you guys give this a final test - I understand there's more to do - but I'm being dragged back onto management responsibilities - handover to Harold and merging in j3 etc. So would like to get this in asap as a step in the right direction and then we can build up a list of next steps/you guys can try this yourselves (i promise it's not that bad!)

avatar brianteeman
brianteeman - comment - 25 Feb 2019

@wilsonge I will try to find some time tonight - I am working on some stuff for the marketing team thats taking my available time

avatar zwiastunsw
zwiastunsw - comment - 25 Feb 2019

@wilsonge: We've made an appointment today for a Skype session

avatar brianteeman
brianteeman - comment - 26 Feb 2019

Is it perfect - no
Is it better than it was yesterday - yes

If the non graphical view was also fixed then I believe that would be a reasonable accommodation

avatar wilsonge wilsonge - change - 27 Feb 2019
Title
[4.0] [a11y] Make media manager browse view work with keyboard navigation
[4.0] [a11y] [NO CACHE] Make media manager browse view work with keyboard navigation
avatar wilsonge wilsonge - edited - 27 Feb 2019
avatar wilsonge wilsonge - change - 27 Feb 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-02-27 11:00:37
Closed_By wilsonge
avatar wilsonge wilsonge - close - 27 Feb 2019
avatar wilsonge wilsonge - merge - 27 Feb 2019
avatar wilsonge
wilsonge - comment - 27 Feb 2019

I'm going to do something separate for the list view - I was having issues with the icons showing - I can push what I had tonight - because I don't think it was a JS issue - it seemed something CSS - that I'm sure i was just being stupid with

Add a Comment

Login with GitHub to post a comment