Improve field templates for Rivet

Created on 16 November 2023, 12 months ago
Updated 1 January 2024, 11 months ago

Problem/Motivation

The default field output in field.html.twig is not leveraging rivet utility classes appropriately and could be vastly improved, for accessibility and a standard look and feel.

For example, sequences of fields displayed on the page don't have any space between them.

Proposed resolution

  • Improve the default field.html.twig for the most common use cases.
  • When fields have multiple items, use an unordered list, with rvt-list-plain and rvt-display-inline (this can be overridden and customized on field-specific basis.
  • Leverage the rvt-legend, rvt-text-bold, rvt-display-inline and rvt-sr-only to format the field label appropriately.
  • Ensure text fields are wrapped in a class containing rvt-prose.
📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇪🇨Ecuador jwilson3

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024