backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 39 forks source link

[A11Y] UX Fields to add html tag Attributes for fields, menu links and blocks #5158

Open JosiasVasquez opened 3 years ago

JosiasVasquez commented 3 years ago

I need to get accessibility improvements in backdrop, to do this I need to add area attributes in blocks and fields, for example wen I add a link field, I need to add de role="button" attribute to show this link as button for screen readers.

To add this attributes I think you can add a tab in blocks and fields configuration , like the css tab to add clases and styles; as is now.

For example: Tab add atributes: When the tab is open: Field: attribute: Field: value.

Result, get bouth values and write this in the html tag. attribute="value"

I don't see anythin like this in an other place, Is there a backdrop module to add attributes for menu links, but the attributes are default, and can't be changed.

This feature can also add to menus, and other places to add mor functionality.

Excuse my english if is bad, but my native language is spanish, and I am learning every day.

I realy hope I was explain my idea.

klonos commented 3 years ago

Hello @CoachJos ...is there any contrib module in Drupal that has this functionality? Perhaps we could port it to Backdrop then.

JosiasVasquez commented 3 years ago

Hello, I do a search and I found those modules.

Form actions attributes. Is a appy module, to add form elements attributes. https://www.drupal.org/project/form_options_attributes

This module adds field attributes and I think is the most similar module than my idea. https://www.drupal.org/project/advance_field_attributes

Adds attributes to layout builder components. https://www.drupal.org/project/layout_builder_component_attributes

Adds attributes to blocks. https://www.drupal.org/project/block_attributes

I don't understand how it works, but I think it can be helpfull. https://www.drupal.org/project/text_attributes