On table with drag&drop when dragging with the keyboard arrow keys there should be a visual feedback when moving to a place where the current element is not possible to be placed at.

Example:
When going left like in that image below you don't get any feedback about that this move was not allowed. Instead of just doing nothing there should to be at least something to be happening, like showing an information that that move was not possible.

visual feedback needed

A first approach would be to show a red Icon, instead of the black one, for about 1 second. Then switching back to the black one.

visual feedback example

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kwoxer created an issue. See original summary.

BarisW’s picture

Priority: Major » Normal
Status: Needs review » Active
Issue tags: -Triaged for D8 major current state, -Triaged core major, -Needs accessibility review +Needs issue summary update

Hey kwoxer,

Need review is only for when there is an actual patch to review. Let's put this in the default state.
Also, this isn't a major issue IMHO. Lastly, tags like 'needs accessibility review' are to be added when there is something for the accessibility team to test.

geophysicist’s picture

BarisW’s picture

Status: Active » Needs review
kwoxer’s picture

Category: Bug report » Feature request
Issue summary: View changes
Issue tags: -Needs issue summary update
kwoxer’s picture

Issue summary: View changes
kwoxer’s picture

FileSize
13.52 KB
kwoxer’s picture

Issue summary: View changes
BarisW’s picture

Status: Needs review » Needs work

Thanks for the patch. Great work!

A few things:

  • For screenreaders, we would also need a way to let people know about the error. An image alone would not be enough. Can we add a hidden span with an error message?
  • Javascript changes should be made in the es6 files, not directly in the js files. See Drupal core now using ES6 for javascript development.
  • And would it be possible to add a test for this?
kwoxer’s picture

FileSize
9.8 KB

Thank you very much @geophysicist.

I tested your Patch together with https://www.drupal.org/files/issues/2725259-31.patch and it works properly.

Here an image:

But as @BarisW said, screen readers are missing.

geophysicist’s picture

Hey
I will add screen readers, move code to es6 file as soon as possible (3-5 days)
Also will try to add tests.

kwoxer’s picture

@geophysicist how is it going with the table drag, did you found some time already? :)

geophysicist’s picture

@kwoxer not yet. Sorry about that. But i'm working in the US this month and i'll try to find some time to finish this task.
P.S. my docker machine "vienna2017" is still running.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andrewmacpherson’s picture

andrewmacpherson’s picture

From the issue summary, and screenshot #10:

A first approach would be to show a red Icon, instead of the black one, for about 1 second. Then switching back to the black one.

If colour is the only indication, then it doesn't satisfy WCAG 1.4.1 Use of Color: "Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. (Level A)"

I'm not sure what else to suggest as an indication. In native desktop applications, it would probably also involve whatever passes as a system bell (typically a sound, a screen flash, or colour inversion, respecting user's OS-level preferences). One way to do it is a visual pop-up text warning positioned on the same row (similar to a tooltip). That would need to linger for more than one second though.

Feedback after attempting a non-allowed movement isn't the only approach this could take. Turning the idea around, can we indicate what movements are allowed? For example, change the icon which is used for the drag handle. A tabledrag that doesn't allow nesting could have an icon which only had the vertical arrows instead of all four direction. Both approaches could be combined.

re #9:

For screenreaders, we would also need a way to let people know about the error. An image alone would not be enough. Can we add a hidden span with an error message?

For the time being, I wouldn't try to address screenreaders here. The tabledrag hasn't ever worked well with screen readers, even when it was working for sighted keyboard users. There are bigger issues to solve for screen readers, and fixing those will involve a bigger rework of tabledrag. I've filed #3027229: Modernize tabledrag accessibility. for that.

andrewmacpherson’s picture

I manually tested patch #3 (with the latest patch at #2725259: [regression] Table Drag handles no longer respond to up/down arrow keys, it seems to work in all the right circumstances.

andrewmacpherson’s picture

Changing the parent issue, there's an umbrella plan for various tabledrag accessibility/usability improvements now.

tim.plunkett’s picture

Issue tags: -accessibility (duplicate tag), -Vienna2017 +Accessibility

Fixing tags

Version: 8.6.x-dev » 8.8.x-dev

Drupal 8.6.x will not receive any further development aside from security fixes. Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.