-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4.0] Admin List views Accessibility for Drag and Drop #23758
Comments
The code looks almost perfect. I would just add some sr-only text here to describe the button for assistive technology |
Maybe this is ot, but I wonder if there is a usecase where the case !saveOrder occurs? This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/23758. |
@chmst basically I was only referring to the code that also @brianteeman shared above. I have zero clue if the conditional ever gets triggered but most importantly for me the tooltip in there is a good indication of a failed design... PS if it's disabled then DO NOT SHOW THAT COLUMN!!! |
agree with "do notshow the column if ordering is disabled.
The text should be defined, mybe with text variable for the number. |
|
@brianteeman @chmst a reminder that we don't have sprintf in the JS API, so this can only be implemented PHP side |
If we have to change all list views, it does not matter to add the attribute directly. |
<span class="sr-only" data-text="<?php sprintf('Some text %s', '{replacement}'); ?>"><?php echo Text::_('JORDERPOSITION ') . $item->ordering; ?></span> this could be handled very easily in the js world |
There are 2 ways to start using ordering in the list views: |
@infograf768 you are confused. This is not about column sorting but about drag and drop ordering. Drag and drop ordering is not always needed as in some views it serves no function |
I was speaking of drag and drop ordering. |
Your previous comment makes no sense then |
So what I understand: So we can do
My question @dgrammatiko this input field is hidden with display:none. How can the user make it visible? |
actually it can do and it can be accessible |
The code presented above seems to be good, but this code does not contain the marking needed to operate the keyboard drag function. See the pattern in the first link cited by Brian (Pattern 1: Sorting a List). |
He can't, this input is used by the program for referencing the position in the list. If you need this info somewhere you need to show me your desired HTML markup and then I'll have to figure out how to adapt the PHP + JS to render and update that info whenever some changes are made... |
Check this out - it is perfect - and note the use of aria-live |
@brianteeman yup based on dragula so it's. good fit. Also proves that it was a good idea to get dragula in J4 couple of years ago... |
wish I had the skill to implement it |
Steps to reproduce the issue
All List views in the backend are falling sort on Drag and drop with keyboard. What needs to be done:
Needs to become:
Then we can apply the same logic @Fedik used in the subforms field custom element.
Expected result
Actual result
System information (as much as possible)
Additional comments
@chmst @zwiastunsw can you help with the html markup, then either me or @Fedik will be able to patch the missing interactivity
The text was updated successfully, but these errors were encountered: