Open FranECross opened 3 days ago
Michelle has given approval to work with DST to figure out a Front end fix.
Started a thread with DST for next steps: https://dsva.slack.com/archives/C01DBGX4P45/p1730931073353459?thread_ts=1727883538.474889&cid=C01DBGX4P45
Description
In early October 2024, we converted all HTML tables in content-build to move from the V1 to V3 DS va-table component.
We discovered while working that ticket that table headers from Drupal content did not appear on mobile and filed (DST defect 3327), & Slack discussion with DST about it).
DST fixed this mid-October and now table headers appear BUT headers are constructed differently in the markup on mobile vs. desktop (this was the case prior to the recent fix). Mobile uses a
::before
element for the text and desktop does not. This causes any HTML created within the Drupal table header to be rendered in the Front-end as regular characters, and does not render as HTML. This issue is in production.Scrum thread describing behavior in prod
There are cases, also, where the only HTML is a
 
, which is showing on mobile. These cases may be harder for Editors to mitigate in content, since the nbsp; is not immediately visible.Also captions: I also found an instance of HTML being added to the Table caption field which also produced a display issue on mobile where it doesn't on desktop:
<h3>
tag) did not get respected on Desktop, it was simply ignored as it should have been and displayed asTable caption
- a<caption>
cannot and should not be a heading.<h3>Table caption<h3>
which is incorrect, we shouldn't see the HTML tags.We don't have a valid use case for Editors entering HTML in the table caption field.
To reproduce
Impact
Mobile-only. Any table created in Drupal that includes HTML in the table header renders the markup as text characters on mobile. We have 1500 known tables. Verifying how many include HTML is manual.
Drupal notes
Editors in Drupal can create tables using the Table paragraph type. Editors create rows for the table and the first row is used as the header. Editors sometimes include HTML for formatting including bold, or to include links.
Table field is present in several areas of Drupal, and is managed by a contributed module. We do not have a clear path to limit Editors' ability to enter HTML in only the header row.
<ul>
and<li>
tags in the table cell field in Drupal<strong>
tag)Front-end fix
We need to determine if it's possible for the front-end to either render HTML properly or exclude the HTML characters from rendering as text.
Short term fix: manual Drupal data cleanup
Laura F is reviewing the 1500 tables to remove HTML where possible. We have an existing table audit to work from. Laura volunteered, Randi is willing to assist.
User story
AS A a Veteran et al using the Mobile app and looking pension rates, disability compensation rates, etc. I WANT to view table headers without HTML markup SO THAT I'm not confused and also so that I don't lose confidence in VA.gov
Acceptance criteria