I just read through @jessebeach's post ARIA Grid: Supporting nonvisual layout and keyboard traversal, and thought it was worth making an issue here to see if some of the ideas here could be incorporated into Drupal.

At Facebook, we are experimenting with a user interface pattern for traversing a page with a keyboard that we call a logical grid. A logical grid reduces numerous tab stops to a single tab stop within a part of the interface designated as a grid. From the single tab stop, a person can traverse items in the grid using arrow keys. In addition, Accessible Rich Internet Application (ARIA) Grid semantics express the structure to assistive technology users.

For more information, see:
https://www.w3.org/TR/wai-aria-practices-1.1/#grid

Comments

mgifford created an issue. See original summary.

andrewmacpherson’s picture

Yes, let's look into this and other ARIA patterns too. How about a parent plan issue for discussing the ARIA authoring practices as a whole? I was thinking about updating our vertical tabs to follow these.

mgifford’s picture

Sounds like a good plan. @andrewmacpherson can you set that up? I can pull in a few child issues under the parent.

andrewmacpherson’s picture

Title: Adopting Facebooks's Logical Grid » Adopting ARIA Grid pattern
Parent issue: » #2893640: Modernize ARIA usage, in line with ARIA 1.1 and the ARIA Authoring Practices guide.

Reading through Jesse's article, it seems to follow the ARIA Authoring Practices description fairly closely, so I'm updating the title.

I guess the next steps are:
Consider use cases for Drupal core, and maybe contrib too. Do we currently have any admin pages which would benefit from this?
Look for implementations in the wild, and see what use-cases they try to address. It'll be interesting to see how closely they match the ARIA Authoring Practices.

New parent plan created: #2893640: Modernize ARIA usage, in line with ARIA 1.1 and the ARIA Authoring Practices guide.

andrewmacpherson’s picture

The "manage display" interface in Field UI might benefit from this.

It's already a table. Each row has 3 or 4 focusable controls:

  • row weight (drag handle),
  • label visibility (select),
  • formatter (select),
  • formatter settings (ajax button, only if settings are available.)

Say a node type has 10 custom fields, and a sighted keyboard-only user wants to change the settings for the last formatter.

  • Tabbing through these currently takes 40 tab key presses.
  • If arrows controlled focus, reaching the desired button would take 13 key presses (10 down, 3 right).

A quirk: if focus is on a formatter settings button, and the row below does not have a formatter settings button, what happns when the down arrow key is pressed?

andrewmacpherson’s picture

The edit-menu form might also benefit from aria grid (e.g. admin/structure/menu/manage/admin).

These rows also have 4 focusable items on each row:

  • Row weight (drag handle, or select)
  • Menu item name (link to actual destination of menu item)
  • enabled (checkbox)
  • edit (button)

This interface has nesting too, so it might better suit a Tree View UI.

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

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Bojhan’s picture

Yep, so the difficulty will be that Field UI can be nested AND a table, this really depends on what the particular field UI is trying to achieve. When it's merely a "weight" drag and drop, then you can go with ARIA Grid but when you add "nesting" to it with for example field groups it all of a sudden becomes a "tree view". Perhaps we can "auto-detect" this and apply the right semantics.

andrewmacpherson’s picture

The proposed layout builder UI may be a good fit for the ARIA Grid pattern. It also involves drag-and-drop. I don't know of any examples of accessible drag/drop layout builders in the wild.

mgifford’s picture

It seems as good as any solution that we have to work with at the moment. Thanks for connecting these issues Andrew.

jessebeach’s picture

Nested tables present a problem for the pattern. Haven't figured those out yet :)

You can make the UI keyboard manipulable. Check out this tic-tac-toe example: http://oaa-accessibility.org/example/17/

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

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now 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.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now 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.

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

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.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.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). 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.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now 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.

bnjmnm’s picture

It seems like views tables with focusable inputs such as the one found at admin/content would benefit from ARIA grid

I did some basic screenreader and keyboard navigation testing in admin/content and compared it to the ARIA grid demo here:
https://www.w3.org/TR/wai-aria-practices/examples/grid/dataGrids.html#ex...

Being able to navigate through the admin/content table with arrows seems preferable + more efficient than tabbing linearly through each focusable element in a cell. The screenreader interpretation seemed to be a more useful description as well, but I'll need to get further along in my a11y training before I could say that with certainty.

andrewmacpherson’s picture

Re. #17: I'm skeptical of the ARIA grid for /admin/content, or other entity listings.

I think ARIA grid is principally aimed at grids where every cell has something to do; spreadsheets are the common example given. But our entity listings are a far cry from that, because there are so many columns without any operable controls in them.

The permissions page could be a better match for ARIA grid. There's a more predictable content model there; 1 cell == 1 checkbox (barring row headers). Site builders aren't going to extend that.

For ARIA grid, it's mandatory to make every cell focusable. Yet our entity listings have several columns which don't contain operable controls. Moreover, they are easily extended by site builders who can add columns for sticky, promoted, comment status, "has translations", etc. I'm worried that making cells focusable which don't have any interactive content inside may be confusing for sighted keyboard users. I don't think we should use it without user testing, or until it has become much more familiar though widespread implemention.

The screenreader interpretation seemed to be a more useful description as well

Can you elaborate on that? Is there a particular feature of ARIA grid which you have in mind.

I don't think it provides any benefit for screen reader users which aren't already available in the table navigation tools that the screen reader provides. There isn't a clear justification for overriding these with custom behaviours. I'd worry that it introduces a severe maintenance or regression risk; if one attribute is mis-handled, the whole structure could have problems.

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

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

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

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.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.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.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.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now 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.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now 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: 10.1.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, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.