Allow adding attributes on sections and choose semantic HTML element/ARIA landmark roles

Created on 14 June 2024, 14 days ago

Hi all,

I'm not sure if this has been discussed and I'm still reading through all the issues, the Starshot and Experience Builder project pages, etc. But I just wanted to post an issue currently top of mind that I've had building sites both in Drupal and in WordPress.

At present, neither CMS enforces in content creation making sure that content placed on the page is always within an ARIA landmark as discussed here: Technique ARIA11:Using ARIA landmarks to identify regions of a page. One of the great benefits of Drupal's Layout Builder is that you first have to create a section before you can place blocks on the page. Ideally, in the updated Layout Builder/Experience Builder, this functionality should be improved to also allow (and require) choosing from landmark roles, such as HTML elements main, footer, header, aside, etc., or if a div assigning a "role" attribute. This should be possible both in the content region and other regions (assuming XB will use regions?). WordPress has this functionality with its "Group" block, but it doesn't enforce surrounding all content in a Group block first. So people are able to put content on the page without adhering to this best practice as mentioned on the linked page:

It is a best practice to include all content on the page in landmarks, so that screen reader users who rely on them to navigate from section to section do not lose track of content.

I'm not sure if this has to be done in the data model, page builder, or what (not a backend guy!), but just wanted to suggest it.

✨ Feature request
Status

Active

Component

Page builder

Created by

πŸ‡ΊπŸ‡ΈUnited States dalemoore

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

Comments & Activities

Production build 0.69.0 2024