Grid-style field type keyboard navigation

Created on 1 October 2023, about 1 year ago
Updated 3 March 2024, 9 months ago

Problem/Motivation

Radiobuttons are styled in a grid formation but keyboard navigation up/down move focus left/right same as actual left/right.

Navigation thus follows input type instead of visual layout.

Steps to reproduce

Proposed resolution

For grid pattern see
https://www.w3.org/WAI/ARIA/apg/patterns/grid/

This issue should become obsolete after moving to modal for field creation.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Field 

Last updated 20 minutes ago

Created by

🇫🇮Finland simohell

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @simohell
  • Assigned to kostyashupenko
  • 🇷🇺Russia kostyashupenko Omsk

    Grabbed. Tomorrow morning result

  • Issue was unassigned.
  • Status changed to Needs review 10 months ago
  • 🇷🇺Russia kostyashupenko Omsk

    Added logic, and also added for the next section "Choose an option below" coz it also have grid-style radio blocks.

    Logic in javascript is sensitive to the amount of grid columns.

  • 🇮🇳India Sandeep_k New Delhi

    @kostyashupenko, Tested shared patch. I was able to reproduce this issue but got an error while applying the patch (Patch not getting applied). Attaching the error here-

  • 🇷🇺Russia kostyashupenko Omsk

    Please try again. I wasn't able to get any errors. There was a tiny rebase with no conflicts, however patch could be applied, so idk.

  • Assigned to dishakatariya
  • Issue was unassigned.
  • Status changed to RTBC 10 months ago
  • 🇮🇳India dishakatariya

    Hi, I have verified the Current changes (#8)3390914-grid-style-field-type Branch MR on 11.x version.This is working as expected.

    Followed the below testing steps:
    1.Install the Drupal version 11.x
    2. Fetch the latest branch
    3. Now Go to the /admin/structure
    4. Select content types /admin/structure/types
    5. Now select any Article or Basic Page
    6. Go to the Manage Fields
    7. Click on Create New field button and the Grid-style field types should appear.
    8. Now check with clicking page up-down keys should work as up-down keyboard navigation for grid-style radio buttons field types.
    Testing Results:
    With the page up and down arrow keys the grid-style radios buttons are having proper keyboad navigation as up-down now.
    Hence moving this issue to RTBC.
    Thanks!

  • 🇷🇺Russia niklan Russia, Perm

    Hi folks, I've just created a similar issue and found this one. I'm not an expert in a11y, but I expected all these field types in the grid should be tabbable. I don't even thought that you should be able to navigate them with the arrow keys. Do they conflict with each other or what? I think all of them should be available by just TABbing other them, no?

  • 🇫🇮Finland simohell

    Hi, Issue 📌 Field selection breaks conventions and increases cognitive load Needs review changes the type selection from radio buttons to links that are displayed as a grid.

    Will this patch work with that version as well?

  • 🇳🇿New Zealand quietone

    I'm triaging RTBC issues . I read the IS and the comments. I didn't find any unanswered questions or other work to do.

    @DishaKatariya, thank you for the testing! When reporting results it helps committer and any other reviewers when the testing results are available from the issue summary. I know there are not many comments in this issue but when there are many comments and many test results over time it does help to have a pointer to the latest results.

    I applied the diff and confirmed that the navigation with the arrow keys works as one would expect.

    Leaving at RTBC

  • 🇫🇷France nod_ Lille

    If I understood correctly, this is temporary until we get 📌 Move the first two steps of field creation into a modal. Needs work , in which we'd remove this code? how far off is the modal issue?

  • Status changed to Needs work 9 months ago
  • 🇫🇷France nod_ Lille

    few comments on the MR

Production build 0.71.5 2024