makeElementAccessible() removes links

Created on 16 June 2023, over 1 year ago

Problem/Motivation

Links in table headings are being turned into text.

Steps to reproduce

Put a link in a table heading (example below).
View the table at phone width.
Observe that the link in the table head is missing.


<table>
	<thead>
		<tr>
			<th scope="col">&nbsp;</th>
			<th scope="col">heading with <a href="https://drupal.org" title="this is the link title">link</a></th>
		</tr>
	</thead>
	<tbody>
		<tr>
			<td>this is a row</td>
			<td>some data</td>
		</tr>
		<tr>
			<td>this is another row</td>
			<td>more data</td>
		</tr>
	</tbody>
</table>

Proposed resolution

Use .html() instead of .text(). I don't think there's a security issue when using innerHTML to duplicate a node that's already on the page.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States ksenzee Washington state

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