Make sure Place Block buttons identify as buttons in Block layout UI.

Created on 23 September 2016, about 8 years ago
Updated 29 May 2023, over 1 year ago

Problem/Motivation

The "place block" buttons on the Block Layout UI (admin/structure/block) are made with HTML anchor tags.

These are announced as a "link" by most screen readers, suggesting that the user will be directed to a new page. The actual behaviour is better described as a "button", to suggest that something will happen on the current page.

Proposed resolution

Either:

  1. Preferably, use a <button> element for the the "Place block" buttons on the Block Layout UI.
  2. If this is difficult, adding role="button" to the existing anchor tag will suffice, but we would also need to ensure it is activated by enter OR the spacebar key, as a <button> would be. (Anchor elements are normally only activated by the enter key.)

Remaining tasks

Write a patch.

User interface changes

  • No visual changes intended.
  • Improve the semantics conveyed to assistive technology.
  • .

API changes

None expected.

Data model changes

None expected.

πŸ› Bug report
Status

Postponed

Version

11.0 πŸ”₯

Component
BlockΒ  β†’

Last updated 5 days ago

Created by

πŸ‡¬πŸ‡§United Kingdom andrewmacpherson

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

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