Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295267

Do not move the cursor to the top of the page on ajax calls

$
0
0

Problem/Motivation

On most ajax triggered actions, we are losing the focus on the triggering element as it is removed from the dom then re-added.
That forces screen readers users or people navigating with their keyboard to restart from the beginning of the page.

Steps to reproduce

  1. Install drupal standard
  2. Go to the views add form (admin/structure/views/add)
  3. Focus the "View settings"> "Show" field with your keyboard
  4. Change its value using the keyboard
  5. Once it has been reloaded, hit tab

Expected result: the field just after the "Show" field is focused
Current result: the "Skip to main content" link is focused

Proposed resolution

Refocus the triggering element at the end of the ajax call unless an other element has been explicitely focused by the ajax call.

Remaining tasks

Contributor tasks needed
TaskNovice task?Contributor instructionsComplete?
Create a patchInstructionsDone
Update the issue summaryInstructionsDone
Update the issue summary noting if allowed during the betaInstructionsDone
Manually test the patch NoviceInstructions
Add steps to reproduce the issueNoviceInstructionsDone
Review patch to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standardsInstructions

User interface changes

None.

API changes

None.

Data model changes

None.

Why this should be an RC target

Without this patch, the admin side of Drupal will be more difficult for screen reader users and keyboard only users to navigate. Predictability is really important for blind users and having the cursor location move unexpectedly can be a major disruption.

RC phase evaluation

Reference: https://www.drupal.org/core/d8-allowed-changes
Issue categoryBug because the expected behavior is to keep the focused element
Issue priorityNormal because it only affects a really small percentage of users
Needed in RCThe main goal of this issue is accessibility. (Reduces screen readers pain using the Drupal interface)
Disruption: Fixes a bug, blocks a contributed project, or should be backported to Drupal 7Not disruptive as it takes care to do nothing in the case the focus were called by the ajax response on purpose.

Viewing all articles
Browse latest Browse all 295267

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>