a11y NPM Resource Changed ? ? Pending

User tests: Successful: Unsuccessful:

avatar akshitrattan
akshitrattan
30 Jan 2022

Pull Request for Issue #36881 .

Summary of Changes

Made the create-new-folder modal in the media manager keyboard focused

Testing Instructions

open the media manager and try pressing tab or shift+tab the focus doesn't shift to the backdrop and stays in the modal

Actual result BEFORE applying this Pull Request

on pressing tab the keyboard focus instead of remaining in the modal shifts to the modal backdrop decreasing its accessibility

Expected result AFTER applying this Pull Request

the keyboard focus remains in the modal

Documentation Changes Required

no changes required
P.S.- This might have solved the same problem with other modals as I made the changes in administrator/components/com_media/resources/scripts/components/modals/modal.vue

ezgif com-gif-maker

avatar akshitrattan akshitrattan - open - 30 Jan 2022
avatar akshitrattan akshitrattan - change - 30 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 30 Jan 2022
Category Administration com_media NPM Change
avatar akshitrattan akshitrattan - change - 30 Jan 2022
The description was changed
avatar akshitrattan akshitrattan - edited - 30 Jan 2022
avatar akshitrattan akshitrattan - change - 30 Jan 2022
Labels Added: NPM Resource Changed ?
avatar akshitrattan akshitrattan - change - 30 Jan 2022
The description was changed
avatar akshitrattan akshitrattan - edited - 30 Jan 2022
avatar brianteeman
brianteeman - comment - 30 Jan 2022

Please update with a meaningful title

avatar akshitrattan akshitrattan - change - 30 Jan 2022
Title
Fix#36881
Create-folder-modal in the media manger made keyboard focused
avatar akshitrattan akshitrattan - edited - 30 Jan 2022
avatar akshitrattan akshitrattan - change - 30 Jan 2022
Title
Create-folder-modal in the media manger made keyboard focused
create-folder-modal in the media manger made keyboard focused
avatar akshitrattan akshitrattan - edited - 30 Jan 2022
avatar akshitrattan
akshitrattan - comment - 30 Jan 2022

Please update with a meaningful title

I changed the title, could you please check and confirm whether the title is appropriate

avatar brianteeman brianteeman - test_item - 30 Jan 2022 - Tested unsuccessfully
avatar brianteeman
brianteeman - comment - 30 Jan 2022

I have tested this item ? unsuccessfully on 5351f6d


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36892.

avatar brianteeman
brianteeman - comment - 30 Jan 2022

The new title is better - thanks

unfortunately my tests do not match your gif and there are two problems.

  1. Focus should not be moved to the X close on open
  2. Can never reach the Create button

media

avatar akshitrattan
akshitrattan - comment - 30 Jan 2022

The new title is better - thanks

unfortunately my tests do not match your gif and there are two problems.

  1. Focus should not be moved to the X close
  2. Can never reach the Create button

media

I can solve the first problem, but i want a clarification that when the modal opens, do you want the focus to be at folder name input and not the close button

avatar akshitrattan
akshitrattan - comment - 30 Jan 2022

The new title is better - thanks

unfortunately my tests do not match your gif and there are two problems.

  1. Focus should not be moved to the X close
  2. Can never reach the Create button

media

the second problem is mainly becuase in the variable 'focusableElements' the button:not([disabled]) is there, this means that when the we enter something in the folder name input, the DOM is updated and the button is enabled however, the funtion i created is called before the DOM is updated and thus it is not able to catch the updated DOM

avatar brianteeman
brianteeman - comment - 30 Jan 2022

I can solve the first problem, but i want a clarification that when the modal opens, do you want the focus to be at folder name input and not the close button

If I remember correctly you do NOT need to do anything to set the focus on load at all.

avatar akshitrattan
akshitrattan - comment - 30 Jan 2022

Member

It was necessary to put the focus on the modal explicitly once it is opened because otherwise focus was set to backdrop buttons
As we press the tab button the focus is shifted to the buttons in the backdrop

avatar brianteeman
brianteeman - comment - 30 Jan 2022

Then you should look at how other (not com_media) modals behave

avatar akshitrattan
akshitrattan - comment - 30 Jan 2022

Then you should look at how other (not com_media) modals behave

I did that is why i made the changes in the modal.vue and not create-folder-modal.vue particulary
If you could test the functionality with other modals then it would be great help, as it would tell whether the changes were applied to all the modals or just the create-folder-modal

avatar brianteeman
brianteeman - comment - 30 Jan 2022

I meant look at modals in other joomla components

avatar akshitrattan
akshitrattan - comment - 30 Jan 2022

I meant look at modals in other joomla components

oh sorry, my bad!
@dgrammatiko provided certain links to code snippets of joomla modal component in the comments of the issue, the code I wrote is in a way inspired from that code snippet, as in they work the same

avatar akshitrattan
akshitrattan - comment - 30 Jan 2022

when in folder name input section, if we press the enter key it automatically shifts to the create button and the folder is created

avatar akshitrattan
akshitrattan - comment - 3 Feb 2022

@brianteeman @dgrammatiko I have solved all the issues with the PR

ezgif com-gif-maker (1)

avatar HarshJaiswani HarshJaiswani - test_item - 9 Feb 2022 - Tested successfully
avatar HarshJaiswani
HarshJaiswani - comment - 9 Feb 2022

I have tested this item successfully on 20be568


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36892.

avatar RickR2H RickR2H - test_item - 11 Feb 2022 - Tested successfully
avatar RickR2H
RickR2H - comment - 11 Feb 2022

I have tested this item successfully on 20be568


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36892.

avatar RickR2H RickR2H - change - 11 Feb 2022
Status Pending Ready to Commit
avatar RickR2H
RickR2H - comment - 11 Feb 2022

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36892.

avatar Quy Quy - change - 11 Feb 2022
Status Ready to Commit Pending
avatar akshitrattan akshitrattan - change - 16 Feb 2022
Labels Added: ?
avatar akshitrattan
akshitrattan - comment - 16 Feb 2022

@dgrammatiko I have updated the PR

avatar drmenzelit
drmenzelit - comment - 22 Feb 2022

@akshitrattan can you please check your PR? It is out-of-date

avatar akshitrattan akshitrattan - change - 22 Feb 2022
Labels Removed: ?
avatar akshitrattan
akshitrattan - comment - 22 Feb 2022

@akshitrattan can you please check your PR? It is out-of-date

Done!!

avatar drmenzelit
drmenzelit - comment - 22 Feb 2022

@akshitrattan it seems you have some code style problems on your Javascript, the build of the package is failing with this errors: https://ci.joomla.org/joomla/joomla-cms/51921/1/25

avatar akshitrattan
akshitrattan - comment - 22 Feb 2022

@akshitrattan it seems you have some code style problems on your Javascript, the build of the package is failing with this errors: https://ci.joomla.org/joomla/joomla-cms/51921/1/25

yeah, I am working on those issues, and I did solve a few of them, but there is a particular issue regarding the usage of destructured arrays that I can't seem to solve because I'm not gonna lie, I am a bit unfamiliar with that concept, but I am under the process of researching about it and solving the issue, I hope that works fine?

avatar akshitrattan akshitrattan - change - 22 Feb 2022
Labels Added: a11y
avatar akshitrattan
akshitrattan - comment - 22 Feb 2022

@drmenzelit I have removed all the javascript errors

avatar akshitrattan
akshitrattan - comment - 18 May 2022

@drmenzelit @dgrammatiko I have successfully solved the issue!!

avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull request has automatically rebased to 4.2-dev.

avatar joomla-bot
joomla-bot - comment - 27 Jun 2022

This pull requests has been automatically converted to the PSR-12 coding standard.

avatar HLeithner HLeithner - change - 27 Jun 2022
Labels Added: ?
avatar drmenzelit
drmenzelit - comment - 28 Jun 2022

@akshitrattan @dgrammatiko if the vue code is now ok, please mark the conversation as resolved

avatar drmenzelit drmenzelit - change - 23 Oct 2022
Labels Added: ?
Removed: ?
avatar drmenzelit
drmenzelit - comment - 23 Oct 2022

Closing this in favor of #39042

avatar drmenzelit drmenzelit - close - 23 Oct 2022
avatar drmenzelit drmenzelit - change - 23 Oct 2022
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2022-10-23 09:34:56
Closed_By drmenzelit

Add a Comment

Login with GitHub to post a comment