Keyboard focus not properly managed after AJAX filter selection on view page / Screen reader focus not working as expected on AJAX filter selection on view page

Created on 15 May 2023, about 1 year ago
Updated 14 April 2024, 2 months ago

Problem/Motivation

When using an AJAX filter on a Drupal view page having auto-submit enabled, the keyboard focus is not being properly managed during the update process. After a filter selection is made, the focus remains on the parent div rather than being set to the same element / updated content. This makes it difficult for keyboard-only users and the users of assistive technology to understand the context of changes made to the view after a filter selection is made.

Issue : The Filter form is also getting re-rendered on the ajax along with the updated content. ( Failure of WCAG 2.0 Success Criterion 2.1.1 - Keyboard Accessible, and WCAG 2.0 Success Criterion 2.4.3 - Focus Order)

Steps to reproduce

  1. Navigate to a Drupal view page with an AJAX filter (having auto-submit enabled) using a keyboard interface.
  2. Select a filter option from the dropdown menu..
  3. Observe that the view updates with new content, but the keyboard focus on the parent div. Not on the element that triggered the AJAX update or the updated content.

Impact:
This issue affects keyboard-only users who rely on a keyboard interface to navigate and understand content on web pages. It can make it difficult or impossible for them to understand the context of changes made to the view after a filter selection is made.

Proposed resolution

When a user selects a filter option, the view should be updated with the new content, and the keyboard focus should be set to the updated content or on the element that triggered the AJAX update.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Closed: duplicate

Version

6.0

Component
Views 

Last updated about 4 hours ago

Created by

🇮🇳India ananthakrishnan0496

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024