Accessibility : Focus lost when link is clicked

Created on 10 August 2017, over 7 years ago
Updated 19 February 2025, about 2 months ago

Hey !

So we got this keyboard navigation bug with flag on some browser.

Step to reproduce :

  1. Navigate to the flag icon / link with tab
  2. Press enter to un/flag the content
  3. The focus is lost after the return of ajax callback

On firefox it's not a big issue, tabbing one more time put the focus back on the icon, but on browsers like Chromium, the focus is sent back to the beginning of the document, which is a big accessibility problem (stopping us from our AA accessibility grade, damnโ€ฆ).

So what I was thinking about was to add a Command after the operation, in Controller/ActionLinkController.php, somewhere like // Create a new JQuery Replace command to update the link display. in order to put the focus back on the element when the replace is over, with maybe a small delay or something else.

I'd really like to solve this issue, every feedback / advice is well appreciated.

Thanks !

๐Ÿ› Bug report
Status

Needs work

Version

4.0

Component

User interface

Created by

๐Ÿ‡ซ๐Ÿ‡ทFrance sylvainar Lille

Live updates comments and jobs are added and updated live.
  • Needs reroll

    The patch will have to be re-rolled with new suggestions/changes described in the comments in the issue.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024